Announcement

Collapse
No announcement yet.

remote execution of batch file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • remote execution of batch file

    Hi,

    I am trying to execute the below batch file remotely to several computers and couldn't get it to work. Below is the actual batch file. Thanks
    --------------------------
    net stop wuauserv
    rd c:\windows\softwaredistribution /s /q
    reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Win dowsUpdate /v AccountDomainSid /f
    reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Win dowsUpdate /v PingID /f
    reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Win dowsUpdate /v SusClientId /f
    cls
    net stop wuauserv
    net start wuauserv
    wuauclt /resetauthorization /detectnow

  • #2
    Re: remote execution of batch file

    There's a utility avaiable called psexec that will help with this. Search this board for psexec and you'll find a number of examples of it's use.

    Comment


    • #3
      Re: remote execution of batch file

      I am getting an access denied error with error code 1. Any ideas?

      Here is what I have on the custom tools

      cmd /k "C:\Program Files\Hyena\Tools\psexec.exe" \\%E% \\Server\JOBS\WSUS.bat

      Thanks.
      Mike

      Comment


      • #4
        Re: remote execution of batch file

        I got it to work. I was missing username and password from the psexec command.

        cmd /k "C:\Program Files\Hyena\Tools\psexec.exe" -u DOMAIN\USERNAME -p PASSWORD \\%E% \\Server\JOBS\WSUS.bat

        Comment

        Working...
        X