Jump to content

Featured Replies

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

  • Author

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...