How to make .vbs to execute on target machine?
Attached is a picture of what I have written. The .vbs makes it to the target machine and I even see the brief popup of the cscript cmd window. If I enter cscript "C:\ProgramData\Dell\KACE\kbots_cache\packages\kbots\203\Uninstall_FCS.vbs" on the cmd prompt of the target machine, it works properly. I have tried with and without quotes around the filepath.
What am I missing to make KACE invoke the .vbs?
The .vbs is this script to uninstall MS Forefront: http://gallery.technet.microsoft.com/scriptcenter/ccd81060-292d-4470-afb2-ddb65bf71ce4#content
Note: I hardcoded the directory because I noticed the Activity log showing this. Note the double slash at KACE\\kbots
Launching program: 'C:\windows\System32\cscript.exe' '"C:\ProgramData\Dell\KACE\\kbots_cache\packages\kbots\203\Uninstall_FCS.vbs' wait='false'"
Pasted below the image is the Run Now status.
Output Log
Running as: SYSTEM Launched Process: cscript.exe
Activity Log
Launching program: 'C:\windows\System32\cscript.exe' '"C:\ProgramData\Dell\KACE\kbots_cache\packages\kbots\203\Uninstall_FCS.vbs"' wait='false'
Debug Log
Running kbot: runkbot 203 1384548613r17 Validating kbot xml Kbot xml C:\ProgramData\Dell\KACE\kbots_cache\203-1384548613r17_expanded.xml, Validation Success Kbot Config Info - Start id=203 name=Uninstall Forefront version=1384548613r17 type=policy execute disconnected=false logged_off=false execute events Kbot Config Info - Finish runkbot ----- launching [path='C:\windows\System32' program='cscript.exe' parms='"C:\ProgramData\Dell\KACE\kbots_cache\packages\kbots\203\Uninstall_FCS.vbs"' wait='false'] ----- runkbot ----- completed [exitCode=0] -----
-
Try zipping the vbs and a bat file up as your payload. Within your bat call the vbs using the full path. Perhaps that will work. - Jbr32 11 years ago
Answers (2)
The solution was to use an Online Shell Script with this special call for cscript.
%SystemRoot%\Sysnative\cscript.exe Uninstall_FCS.vbs
Issue was related to 64 bit vs 32 bit registry lookups,
http://www.kace.com/support/resources/kb/article/how-to-import-reg-file-into-64-bit-registry