Scripting Question

KACE script failing - Can't find the file specified

07/19/2019 801 views


I am running a simple script to re-register machines on our WSUS server.

The script fails when it tries to run the following command, saying that it cannot find the file specified:

                  C:\Windows\System32\wuauclt.exe /resetauthorization /detectnow

The file is present and the command can be run manually from the command line, but fails in the script?!?!

See screenshot of the commands in the script.  Any ideas on how to get this command to run?


Best Regards


Answer Summary:
0 Comments   [ + ] Show comments


Answer Chosen by the Author


change your directory to c:\windows\sysnative

Answered 07/19/2019 by: SMal.tmcc
Red Belt

  • my man
  • Thanks SMal.tmcc

    That worked when I ran the script against my own PC, however I had to change the path back to C:\Windows\System32 to get it to succeed on a remote PC.

    Looks like I can run the script successfully now.

    • sysnative only applies to x64bit machines, is the remote an x86?
      • Correct again! Yes, the remote machine is an x86.

        Thanks for your help.
      • here is a good read on sysnative

        you should create smart labels if you have not that are for x86 and x64 and use two scripts with those labels. You can also use a batch and a if then clause to tell what to use for either

        if exist c:\windows\syswow64 (C:\Windows\Systemnative\wuauclt.exe /resetauthorization /detectnow) else (C:\Windows\System32\wuauclt.exe /resetauthorization /detectnow)

All Answers


Which account are you running the script as?


I've had the same problem and had to run the script as something other than local system. Logged-in user or running from my admin account using credentials.

Answered 07/19/2019 by: feeldamped
Third Degree Blue Belt

  • Hi feeldamped,

    I'm running the script as the "Logged-in user"

    The simple commands like "net stop wuauserv" work just fine, but the script is failing when trying run "C:\Windows\System32\wuauclt.exe"

Don't be a Stranger!

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

Sign up! or login

View more:


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