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?
Best Regards
Dave
Answers (2)
Top Answer
change your directory to c:\windows\sysnative
Comments:
-
my man - feeldamped 5 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 5 years ago-
sysnative only applies to x64bit machines, is the remote an x86? - SMal.tmcc 5 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 5 years ago
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.
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 5 years ago