bigfatroundguy Posted November 11, 2008 Posted November 11, 2008 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 locationHKCU,"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? Quote
ricktendo Posted November 11, 2008 Posted November 11, 2008 %UserProfile% shortcuts get installed to the Default user profile, so yes that's the profile usedAnd for the second question, I cant answer that one Quote
Kelsenellenelvian Posted November 11, 2008 Posted November 11, 2008 HKCU,"Software\Microsoft\Windows\CurrentVersion\Run"Actually this key does not fully exist during the T-13 phase.Change it to HKLM and it should be fine. Quote
bigfatroundguy Posted November 13, 2008 Author Posted November 13, 2008 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, Quote
bigfatroundguy Posted November 14, 2008 Author Posted November 14, 2008 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.