/build/static/layout/Breadcrumb_cap_w.png

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)

Posted by: SMal.tmcc 8 years ago
Red Belt
0
tested this out for you. 
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
 
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