Jump to content

Recommended Posts

Posted

Hi,

I am trying to create a registry entry in the AddReg section that will use the currently logged in user's username.

I thought I had it figured out using "HKCU,"Software\MyProgram\MyDirectory","PATH",0x0,"%53%\TargetDirectory".

When I run this inf from my desktop, the entry is created as "C:\Documents and Settings\MYUSERNAME\TargetDirectory", just as I want.

However, when I use that line in my addon during Windows install, the entry is created as "C:\Documents and Settings\Default User\TargetDirectory" - Instead of "MYUSERNAME", it is showing up as "Default User" and the application does not work.

Could someone give me a hint as to how to accomplish this, I have searched to no avail.

Thanks - Gun

Posted

Depends when you call it, if you do it during setup the Default User is the user account, if you delay it to run during 1st login with RunOnceEx it will use that user instead

Posted (edited)

Thanks - that was the nudge I needed, got it figured out now :thumbsup_anim:

Edit: Was happy too soon - worked fine from desktop, run addon via inf, reboot and reg entry correctly created. Was a different story on a live install, still was created as "Default User". Oh well, I will stick with adding it via my first boot reg tweaks.

Edit #2: Got it worked out this morning .. a little convoluted but it works. Instead of running the desired reg entry on first reboot, I added another runonceex at first reboot that makes the desired entry on second reboot.

Edited by SHO_GuN

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...