Jump to content

Reg tweaks not applying


Recommended Posts

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?

Link to comment
Share on other sites


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 /f

Change 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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 /f

Change 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" /f

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

Link to comment
Share on other sites

...

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" /f

You 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" /f

Portions that can be quoted as strings are

SET KEY=HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce

REG ADD "%KEY%" /v "Regtweaks2" /d "regedit /s %systemdrive%\install\regtweaks2.reg" /f

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.

:)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...