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)
Answer Summary:
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

0
you need quotes since there are spaces in the line


Answered 06/11/2014 by: SMal.tmcc
Red Belt

  • 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
Please log in to comment
Answer this question or Comment on this question for clarity

Share