Jump to content

Recommended Posts

Posted

I have created a few addons and incorporate them into a clean build of WinXP SP3. They are designed to be incorporated by Sysoc during that process step. I have inserted ADDREG sections into some of them that create entries in the following registry location

HKCU,"Software\Microsoft\Windows\CurrentVersion\Run"

with the hope that these programs would run each time at startup. I have discovered that some of the ADDREG sections make it into the Administrator account while others seem only to make it under Default User account. I thought during windows setup, that the active user account was the administrators account and therefore the current user should be the administrator account. is there a way to ensure that these kinds of entries always make it into the administrator account?

Posted

thanks folks, the information and suggestions were helpful. here's what i did in the end.

I added the following code:

[RunOnce.AddReg]

HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce","ProgramX",,"rundll32.exe advpack.dll,LaunchINFSection ProgramX.inf,Startup.ProgramX"

[startup.ProgramX]

AddReg = Run.AddReg

[Run.AddReg]

HKCU,"Software\Microsoft\Windows\CurrentVersion\Run","ProgramX",0x0,"""%16422%\yadayada\ProgramX.exe"""

I referenced the RunOnce.AddReg in the main installer section. So essentially, during the main install, i load a key into HKLM that does nothing more than execute the installer one more time at next reboot for no other reason than to make an entry into the key that should already exist by then.

I have noticed that some installations the HKCU key is already there when the main installer operates (and I think ricktendo64 uses this technique with Rainlendar2.1) but as I can't guarantee that all the custom INI files are copied to the right locations in time, I think it is better to let this code execute at next reboot. anyhow, thought you might be interested and thought it might be helpful to others.

again, thx,

Posted

actually, i did some additional testing and while i can't determine the exact state of the HKCU key (regarding whether it fully exists or not), it seems to work with the extra HKLM step i inserted. additionally, i discovered that part of my problem is that I execute a command using RegisterDLLs that depends upon a file having being copied using the CopyFiles directive. i need to maximize the time between the 2 events occuring and placing the copyfiles section at the front of the list of CopyFiles and the command execute at the end of the list of RegisterDLLs to execute appears to do the trick.

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