Scripting Question

KACE Script for sfc /scannow

07/07/2016 1824 views
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

All Answers

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

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:


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