C:\PSEXEC \\mechaflash -u admin -p admin cmd.exe /C "REG ADD HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate /v WUServer /t REG_SZ /d http://WSUS_Server:8530 /f && REG ADD HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate /v WUStatusServer  /t REG_SZ /d http://WSUS_Server:8530 /f && SHUTDOWN -r -t 00"

The command stated that it completed successfully, and the remote machine rebooted. However, the registry changes did not actually take place.

The cmd commands were tested locally and work fine.

Is this a privilege issue?

  • Where does the limited account user come in? – Harry Johnston Dec 5 '11 at 22:58
  • 1
    Is it possible that group policy is overwriting your settings? – Harry Johnston Dec 5 '11 at 22:59
  • The limited user is logged in on the remote computer. However, I'm using the administrator credentials for the computer, but not getting the desired results – Mechaflash Dec 5 '11 at 23:40
  • OK, it shouldn't make any difference who is logged in on the remote computer. I think you need to look elsewhere, e.g., group policy. – Harry Johnston Dec 6 '11 at 1:27
  • 1
    One thing to try would be removing the reboot and seeing what happens. (Note also that you don't generally have to reboot in order to change Windows Update settings.) – Harry Johnston Dec 7 '11 at 2:49

It turns out that the command was in fact working as expected, but the registry changes were being overwritten by group policy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.