/build/static/layout/Breadcrumb_cap_w.png

KACE script failing - Can't find the file specified

Hi,

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?

9k=

Best Regards

Dave



0 Comments   [ + ] Show comments

Answers (2)

Answer Summary:
Posted by: SMal.tmcc 4 years ago
Red Belt
3

Top Answer

change your directory to c:\windows\sysnative


Comments:
  • my man - feeldamped 4 years ago
  • 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.

    Dave - davidoconnell 4 years ago
    • sysnative only applies to x64bit machines, is the remote an x86? - SMal.tmcc 4 years ago
      • Correct again! Yes, the remote machine is an x86.

        Thanks for your help. - davidoconnell 4 years ago
      • here is a good read on sysnative
        https://www.thewindowsclub.com/sysnative-folder-in-windows-64-bit

        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) - SMal.tmcc 4 years ago
Posted by: feeldamped 4 years ago
Third Degree Blue Belt
1

Which account are you running the script as?


wGCu+ZmSjqjAwAAAABJRU5ErkJggg==


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.


Comments:
  • 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" - davidoconnell 4 years ago
 
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