Using cscript.exe to run a .vbs

(imported topic written by tigger0191)

I’m using a vbs script to uninstall Symantec Antivirus because the GUIDs are different in the uninstall registry key from servers to server. vbs looks for a key that has a value named DisplayName with a data string of Symantec Antivirus Win64. This works great on 32 bit servers. So here’s what’s happening:

Action Script line:

wait “{pathname of system folder}\cscript.exe” “{((pathname of client folder of current site) & “__Download\SAVx64UninstNoRebootWithLogging.vbs”)}”

Log file line:

Command succeeded (Exit Code=0) wait “C:\WINDOWS\system32\cscript.exe” “C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData\CustomSite_MyCompany_Content__Download\SAVx64UninstNoRebootWithLogging.vbs”

Problem is the vbs never kicks off. When I copy the command out of the log (“C:\WINDOWS\system32\cscript.exe” “C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData\CustomSite_MyCompany_Content__Download\SAVx64UninstNoRebootWithLogging.vbs”) and run it from a command prompt, it works great!

Why doesn’t this work when the BES client kicks it off? and why does the BES client think it worked?

Thanks for any help.

(imported comment written by JackCoates91)

I think 64 bit redirection is getting you… try adding

action uses wow64 redirection false

at the top.

(imported comment written by tigger0191)

Right you were, Jack! Thanks a million!