Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


Sign in to follow this  
skidajmo

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

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

  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.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...