VBScript to uninstall app with command line switch
Posted on 2011-09-07
I am trying to build a GPO which will run a vbscript at login on users Windows XP machines with Client Side Extensions installed.
In the script, I seach to see if the uninstall.exe is there and if so, then I try and run the following:
WshShell.Run ("%comspec% /c c:\progra~1\spark\uninstall.exe -q")
I try and run with %comspec% so I can use command line switches. The vbscript, when run outside of the login script seems to work but if I try and run it via a login script, users get the following and the app will not run:
"CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory"
I am not stuck on using comspec but I am really looking for a way to utilize the login script to run the uninstall.exe with the -q command line option.
Any assistance is appreciated.