Postinstall Task to Modify Existing Registry Entries
I am attempting to create a postinstallation task to modify an existing registry entry. I have the winlogon.reg file with the changes needed and a winlogon.bat that executes the winlogon.reg. I need to perform this after the Win7 64 bit image push that causes the Library window to popup at log in.
I have tried the .BAT command alone but i keep getting syntax errors.
reg add HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon /v Userinit /d C:\Windows\System32\KUsrInit.exe, /f
I need to combine this two step process that works below. Using a .bat to execute the .reg without prompt.
winlogon.reg file below contains the registry changed needed.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"Userinit"="C:\\Windows\\System32\\KUsrInit.exe,"
"UserinitReplaced"="C:\\Windows\\system32\\userinit.exe,"
Winlogon.bat executes the winlogon.reg without prompt.
regedit.exe /s (winlogon.reg location)
0 Comments
[ + ] Show comments
Answers (1)
Answer Summary:
Please log in to answer
Posted by:
SMal.tmcc
10 years ago
you need quotes since there are spaces in the line
Comments:
-
I had quotes around the KeyName for the space but I didn't put quotes around the data to assign to the ValueName. I didn't realize the : would break the bat.
This was killing me. Thanks again Steve - stevezax257 10 years ago