/build/static/layout/Breadcrumb_cap_w.png

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:
Posted by: SMal.tmcc 9 years ago
Red Belt
0
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 9 years ago

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

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ