Jump to content

RunOnceEx issue


Recommended Posts

I don't know if I did something wrong but some RunOnceEx won't work for me in this case.

In $OEM$ folder I have 6 files which are: autologon.reg, cmdlines.txt, hkcu.reg, hklm.reg, RunOnceEx.cmd and useraccounts.cmd

Through autologon.reg and useraccounts.cmd I create new default user account for my installation and it's working good so far. Actually I wanted to remove some annoyances in my installation (like Windows tour popup, and desktop cleanup wizard selected by default etc.) but I can't achieve that.

Here're contents of my files:

cmdlines.txt:

[COMMANDS] 

"useraccounts.cmd"

"RunOnceEx.cmd"

RunOnceEx.cmd:

cmdow @ /HID
@echo off

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D “Making changes to the default setup” /f

REG ADD %KEY%50 /VE /D “Importing HKLM Registry Tweaks” /f
REG ADD %KEY%50 /V 1 /D “REGEDIT /S hklm.reg” /f

REG ADD %KEY%60 /VE /D “Importing HKCU Registry Tweaks” /f
REG ADD %KEY%60 /V 1 /D “REGEDIT /S hkcu.reg” /f

EXIT

hkcu.reg:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\CleanupWiz]
“NoRun”=dword:00000001

[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu]
[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu2]

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
“ForceClassicControlPanel”=dword:00000001

hklm.reg:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
“ForceClassicControlPanel”=dword:00000001

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Applets\Tour]
“RunCount”=dword:00000000

[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\DelegateFolders\{59031a47-3f72-44a7-89c5-5595fe6b30ee}]

And I also attached my WINNT.SIF file (just in txt mode)

WINNT.txt

Edited by skidajmo
Link to comment
Share on other sites


RunOnceEx.cmd:

cmdow @ /HID
@echo off

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D “Making changes to the default setup” /f

REG ADD %KEY%50 /VE /D “Importing HKLM Registry Tweaks” /f
REG ADD %KEY%50 /V 1 /D “REGEDIT /S hklm.reg” /f

REG ADD %KEY%60 /VE /D “Importing HKCU Registry Tweaks” /f
REG ADD %KEY%60 /V 1 /D “REGEDIT /S hkcu.reg” /f

EXIT

It should look like this:

REG ADD %KEY%\50 /VE /D “Importing HKLM Registry Tweaks” /f
REG ADD %KEY%\50 /V 1 /D “REGEDIT /S hklm.reg” /f

So you forgot the \ after %KEY%!

Edited by HØLLØW
Link to comment
Share on other sites

RunOnceEx.cmd:

cmdow @ /HID
@echo off

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D “Making changes to the default setup” /f

REG ADD %KEY%50 /VE /D “Importing HKLM Registry Tweaks” /f
REG ADD %KEY%50 /V 1 /D “REGEDIT /S hklm.reg” /f

REG ADD %KEY%60 /VE /D “Importing HKCU Registry Tweaks” /f
REG ADD %KEY%60 /V 1 /D “REGEDIT /S hkcu.reg” /f

EXIT

It should look like this:

REG ADD %KEY%\50 /VE /D “Importing HKLM Registry Tweaks” /f
REG ADD %KEY%\50 /V 1 /D “REGEDIT /S hklm.reg” /f

So you forgot the \ after %KEY%!

Well I already tried that before (to add backslashes) but it was of no use. I tried to modify files on several ways but it wasn't working unfortunately. Thanks on trying to help anyways.

Link to comment
Share on other sites

maybe a full path to those reg files?

You need the backslash and the full path to the file.

Yes, I think that's it!

I just forgot that in my post, thank you guys.

Skidajmo, can you try that and give us feedback?

Edited by HØLLØW
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...