Jump to content

Recommended Posts

Posted

for some reason, none of the .reg files that are called from my GuiRunOnce batch scripts are actually merging into the registry. however, if i use the GuiRunOnce test method once windows setup finished, the reg files merge fine. this applies to Current User as well as Local Machine entries. any ideas why they're not merging?


Posted

It would help to know how you are calling them, and what the .reg files actually contain. There could be something simple here, but your post lacks data.

Posted

this is my GuiRunOnce:

[GUIRunOnce]
command1 = "%SystemDrive%\D\BTS_DPs_finish.cmd"
command2 = "%systemroot%\system32\wpi.cmd"
command3 = "%systemroot%\system32\regs.cmd"

wpi.cmd is pretty much the standard WPI script:

@ECHO OFF

REM Example, how to look for CDROM-drive. Must have WPI.ico at the root of the CD.
for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\WPI.ico set CDROM=%%i:
echo Found CD-Rom as drive %CDROM%

REM Determine the WPI startup path.
REM if wpi should run off the cd the replace %~dp0 with %cdrom%.
set wpipath=%cdrom%\WPI_v4.3.8\

REM Hide this command window.
%wpipath%Tools\cmdow.exe @ /hid

REM Special registry tweak needed.
regedit /s %wpipath%common\wpi.reg

REM Make WPI directory the current directory.
cd /d "%wpipath%"

REM Start WPI and wait for its end
wpi.hta

REM Undo registry tweak.
regedit /s %wpipath%common\undo.reg

exit

:end

wpi.reg:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Styles]
"MaxScriptStatements"=dword:ffffffff
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Download]
"CheckExeSignatures"="no"
"RunInvalidSignatures"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments]
"SaveZoneInformation"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Associations]
"LowRiskFileTypes"=".zip;.rar;.nfo;.txt;.exe;.bat;.com;.cmd;.reg;.msi;.htm;.html;.gif;.bmp;.jpg;.avi;.mpg;.mpeg;.mov
;.mp3;.m3u;.wav;"

undo.reg:

Windows Registry Editor Version 5.00

[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Associations]

regs.cmd:

@ECHO OFF

REM Local Machine reg tweaks
regedit /s %systemdrive%\HKLM.reg

REM Current User Reg Tweaks
regedit /s %systemdrive%\HKCU.reg

exit

:end

HKLM.reg:

Windows Registry Editor Version 5.00 
;-----------------------
;Operating System Tweaks
;-----------------------
;Speed up shutdown
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control]
"WaitToKillServiceTimeout"="3000"
;Disables Error Reporting, but notifies when errors occur
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PCHealth\ErrorReporting]
"DoReport"=dword:00000000
;Do not use Simple File Sharing
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]
"forceguest"=dword:00000000

HKCU.reg:

Windows Registry Editor Version 5.00 
;----------------------------------------------
;Tweaks to improve the functionality of Windows
;----------------------------------------------
;Disable the Desktop Cleanup Wizard
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\CleanupWiz]
"NoRun"=dword:00000001
;Change MenuShowDelay (Start Menu load speed)
[HKEY_CURRENT_USER\Control Panel\Desktop]
"MenuShowDelay"="200"
;Disable Recent Documents Menu
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoRecentDocsMenu"=hex:01,00,00,00
;Remove "Shortcut to" on shortcuts
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer]
"link"=hex:00,00,00,00
;Remove "set programs default" from startmenu
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoSMConfigurePrograms"=dword:00000001

Posted

Instead of using regedit in your scripts, try replacing it with %systemroot%\regedit.exe - it may be balking on the path (perhaps it cannot find regedit).

Posted

i took out the /s and it pops up the "are you sure you want to add .reg to the registry?" box so its finding regedit fine

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