tkmadison Posted April 24, 2008 Posted April 24, 2008 I've got my unattended doing just about everything right...except for a couple of things.I have a couple of registry tweaks that are set to be applied in my RunOnceEx but they won't apply. The only way I can get these reg tweaks to apply is by letting the system log in completely and then manually applying them, then logging out then back in to see them applied but I don't really want to have to do it that way.The reg tweak applies to [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\StartPage]which is why it won't apply until the system logs in, I believe.Does anyone have any ideas?
tkmadison Posted April 24, 2008 Author Posted April 24, 2008 Should also mention that Symantec is picking up cmdow as a virus after it gets installed. Could this be affecting the application of any .cmd files being called afterwards?
Martin H Posted April 25, 2008 Posted April 25, 2008 Some regtweaks will only work after explorer.exe has been fully loaded.To workaround this, then you can make your RunOnceEx.cmd to import the tweak from 'HKCU\...\RunOnce' which will start after explorer.exe has been fully loaded, if however, another key has been used before that, like e.g. 'HKLM\...\RunOnceEx'(= the key used in the RunOnceEx install method), since if only using 'HKCU\...\RunOnce' without any preceding keys run, then 'HKCU\...\RunOnce' is run before explorer.exe has been fully loaded(dispite popular belief...).Do something like this at the bottom of your RunOnceEx.cmd :reg add HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce /v command0 /d regedit /s %systemdrive%\install\regtweaks2.reg /fChange regfile name and path accordingly, like e.g. if you use %cdrom% instead of $OEM$ folders etc. Also, if you use the $OEM$ folders, then you probably also need another 'HKCU\...\RunOnce' command(command1) which deletes the '%systemdrive%\install\' folder(or whatever it's called), like something like :reg add HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce /v command1 /d cmd /c rd /s /q %systemdrive%\install\ /f
Arie Posted April 25, 2008 Posted April 25, 2008 Should also mention that Symantec is picking up cmdow as a virus after it gets installed. Could this be affecting the application of any .cmd files being called afterwards?Use cWnd.exe instead, which doesn't have this problem.
tkmadison Posted April 25, 2008 Author Posted April 25, 2008 Do something like this at the bottom of your RunOnceEx.cmd :reg add HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce /v command0 /d regedit /s %systemdrive%\install\regtweaks2.reg /fChange regfile name and path accordingly, like e.g. if you use %cdrom% instead of $OEM$ folders etc.If I put in a line at the end of my RunOnceEx that looks like this:REG ADD %KEY%\095 /V 1 /D "HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce /v command0 /d regedit /s %systemdrive%\install\regtweaks2.reg" /fIt won't work. It tells you that it can't find HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce. The only way I can see it working is if you were to create a RunOnce.cmd and have that called on in the last line of RunOnceEx.
MHz Posted April 26, 2008 Posted April 26, 2008 ...If I put in a line at the end of my RunOnceEx that looks like this:REG ADD %KEY%\095 /V 1 /D "HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce /v command0 /d regedit /s %systemdrive%\install\regtweaks2.reg" /fYou have wrapped a portion within quotes to be treated as 1 string but it includes switches as the bold text shows below.REG ADD %KEY%\095 /V 1 /D "HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce /v command0 /d regedit /s %systemdrive%\install\regtweaks2.reg" /fPortions that can be quoted as strings areSET KEY=HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnceREG ADD "%KEY%" /v "Regtweaks2" /d "regedit /s %systemdrive%\install\regtweaks2.reg" /fThe strings that contain spaces may only require quotes as a general rule. RunOnce key does not use sub keys like the RunOnceEx key, so omit the use of them in the RunOnce key.
tkmadison Posted April 26, 2008 Author Posted April 26, 2008 The strings that contain spaces may only require quotes as a general rule. RunOnce key does not use sub keys like the RunOnceEx key, so omit the use of them in the RunOnce key.That works! Thanks everyone. Been trying to get a tweak to have the pinned start menu programs customized work and it was frustrating the hell out of me.
DragonzBreath Posted May 1, 2008 Posted May 1, 2008 (edited) Apply them here instead - http://unattended.msfn.org/unattended.xp/view/web/14/That applies them to all profiles... etc... Edited May 1, 2008 by DragonzBreath
tkmadison Posted May 1, 2008 Author Posted May 1, 2008 Apply them here instead - http://unattended.msfn.org/unattended.xp/view/web/14/That applies them to all profiles... etc...Tried that....it didn't work.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now