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   [ - ] Hide Comment


  • it has to be run in an elevated command window
Please log in to comment

Answer this question or Comment on this question for clarity


This content is currently hidden from public view.
Reason: Removed by member request
For more information, visit our FAQ's.

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

Answered 07/07/2016 by: SMal.tmcc
Red Belt

  • note: this is for 64bit machines change the sysnative to system32 on 32bit machines
Please log in to comment
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja