KACE Script for sfc /scannow
I'm having trouble getting my script to run. I'm telling kace to launch cmd.exe with parameters /c sfc /scannow and it isn't working. This is what I'm getting:
Running as credntials provided Creating process returned non-zero: C:\WINDOWS\System32\cmd.exe /c sfc /scannow: (0) The operation completed successfully. Error Code: 0 Status Code: 1
It says it completed successfully, but it isn't scanning or anything.
Any ideas?
1 Comment
[ + ] Show comment
-
it has to be run in an elevated command window - SMal.tmcc 8 years ago
Answers (1)
Please log in to answer
Posted by:
SMal.tmcc
8 years ago
tested this out for you.
use an online kscript
create a vbs file
use an online kscript
create a vbs file
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "c:\windows\system32\sfc", "/scannow", "", "runas", 1
upload that to the script and use
Comments:
-
note: this is for 64bit machines change the sysnative to system32 on 32bit machines - SMal.tmcc 8 years ago