/build/static/layout/Breadcrumb_cap_w.png
06/11/2014 3454 views
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:
0 Comments   [ + ] Show comments

Comments


All 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

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share