VBSCRPIT Help
Hi.
I have a script and its suppose to uninstall the program. But i get error everytime.
The script :
Set S = CreateObject("WSCript.shell")
RunPath = Left(Wscript.ScriptFullName, InStrRev(Wscript.ScriptFullName, Wscript.ScriptName) -1)
LogFile = Chr(34) & L & "\Uninstall.log" & chr(34)
S.Run "RunDll32 C:\PROGRA~1\COMMON~1\INSTAL~1\PROFES~1\RunTime\0701\Intel32\Ctor.dll,LaunchSetup" & chr(34) & _
"C:\Program Files\InstallShield Installation Information\{6243B230-C0BD-11D6-8D2B-0010A4EC891F}\Setup.exe" -l0x40c & chr(34) _
& " -s -f1" & chr(34) & RunPath & chr(34) & " -f2" & LogFile & " -SMS", 1 , TRUE
Set S = Nothing
But when i manualy enter this line in cmd, its start to work, but i when i am using it in vbscript it dont.
RunDll32 C:\PROGRA~1\COMMON~1\INSTAL~1\PROFES~1\RunTime\0701\Intel32\Ctor.dll,LaunchSetup
C:\Program Files\InstallShield Installation Information\{6243B230-C0BD-11D6-8D2B-0010A4EC891F}\Setup.exe" -l0x40c
Hope someone can help me out.
I have a script and its suppose to uninstall the program. But i get error everytime.
The script :
Set S = CreateObject("WSCript.shell")
RunPath = Left(Wscript.ScriptFullName, InStrRev(Wscript.ScriptFullName, Wscript.ScriptName) -1)
LogFile = Chr(34) & L & "\Uninstall.log" & chr(34)
S.Run "RunDll32 C:\PROGRA~1\COMMON~1\INSTAL~1\PROFES~1\RunTime\0701\Intel32\Ctor.dll,LaunchSetup" & chr(34) & _
"C:\Program Files\InstallShield Installation Information\{6243B230-C0BD-11D6-8D2B-0010A4EC891F}\Setup.exe" -l0x40c & chr(34) _
& " -s -f1" & chr(34) & RunPath & chr(34) & " -f2" & LogFile & " -SMS", 1 , TRUE
Set S = Nothing
But when i manualy enter this line in cmd, its start to work, but i when i am using it in vbscript it dont.
RunDll32 C:\PROGRA~1\COMMON~1\INSTAL~1\PROFES~1\RunTime\0701\Intel32\Ctor.dll,LaunchSetup
C:\Program Files\InstallShield Installation Information\{6243B230-C0BD-11D6-8D2B-0010A4EC891F}\Setup.exe" -l0x40c
Hope someone can help me out.
0 Comments
[ + ] Show comments
Answers (7)
Please log in to answer
Posted by:
anonymous_9363
16 years ago
Code is easier to follow (and therefore debug) when it's separated out into discrete parts. You started along those lines with RunPath but I've taken it a little further. In doing so, I identified the '-l0x40c' as an orphan which needed to be enclosed in quotes. Try this (and remember to use the 'Code' tag, accessible using the '<%' button, for code)
Set S = CreateObject("WSCript.shell")
RunPath = Left(Wscript.ScriptFullName, InStrRev(Wscript.ScriptFullName, Wscript.ScriptName) -1)
LogFile = Chr(34) & L & "\Uninstall.log" & Chr(34)
ISSetup = "C:\Program Files\InstallShield Installation Information\{6243B230-C0BD-11D6-8D2B-0010A4EC891F}\Setup.exe"
RunDLL32 = "RunDll32 C:\PROGRA~1\COMMON~1\INSTAL~1\PROFES~1\RunTime\0701\Intel32\Ctor.dll,LaunchSetup"
S.Run RunDLL32 & chr(34) & ISSetup & " -l0x40c" & Chr(34) & " -s -f1" & Chr(34) & RunPath & Chr(34) & " -f2" & LogFile & " -SMS", 1 , TRUE
Set S = Nothing
Posted by:
anonymous_9363
16 years ago
It depends on whether or not the InstallShield install is InstallShield script-based or MSI-based .If the former, it doesn't understand that switch. IIRC, you need '/S' (but don't quote me!):
If the latter, you can pass parameters to MSIExec using the '/V' switch, then specify the '/QB'. Note that there's no space between the InstallShield switch and the parameter(s) to be passed:
However, if it *is* MSI-based, why bother with this mess? Just pass the ProductCode to MSIExec with appropriate switches:
ISSetup = "C:\Program Files\InstallShield Installation Information\{6243B230-C0BD-11D6-8D2B-0010A4EC891F}\Setup.exe /S"
If the latter, you can pass parameters to MSIExec using the '/V' switch, then specify the '/QB'. Note that there's no space between the InstallShield switch and the parameter(s) to be passed:
ISSetup = "C:\Program Files\InstallShield Installation Information\{6243B230-C0BD-11D6-8D2B-0010A4EC891F}\Setup.exe /V" & Chr(34) & "/QB" & Chr(34)
However, if it *is* MSI-based, why bother with this mess? Just pass the ProductCode to MSIExec with appropriate switches:
MSIExec /X {ProductCode} /QB
Posted by:
aogilmor
16 years ago
ORIGINAL: SKS
Set S = CreateObject("WSCript.shell")
RunPath = Left(Wscript.ScriptFullName, InStrRev(Wscript.ScriptFullName, Wscript.ScriptName) -1)
LogFile = Chr(34) & L & "\Uninstall.log" & chr(34)
S.Run "RunDll32 C:\PROGRA~1\COMMON~1\INSTAL~1\PROFES~1\RunTime\0701\Intel32\Ctor.dll,LaunchSetup" & chr(34) & _
"C:\Program Files\InstallShield Installation Information\{6243B230-C0BD-11D6-8D2B-0010A4EC891F}\Setup.exe" -l0x40c & chr(34) _
& " -s -f1" & chr(34) & RunPath & chr(34) & " -f2" & LogFile & " -SMS", 1 , TRUE
Set S = Nothing
But when i manualy enter this line in cmd, its start to work, but i when i am using it in vbscript it dont.
RunDll32 C:\PROGRA~1\COMMON~1\INSTAL~1\PROFES~1\RunTime\0701\Intel32\Ctor.dll,LaunchSetup
C:\Program Files\InstallShield Installation Information\{6243B230-C0BD-11D6-8D2B-0010A4EC891F}\Setup.exe" -l0x40c
You're creating 2 levels of difficulty: the first is to debug your vbscript code. The second is to get installshield uninstall to work correctly - problematic even without the complexity of a script.
Better to just create script (or CA if working with an MSI) to manually delete every trace of the application, IMHO. Always worked for me.
Posted by:
anonymous_9363
16 years ago
ORIGINAL: aogilmorOwen, while I tend to agree with you, the problem with that approach is that one must know beforehand exactly what the app does to a workstation. You and I both know that apps have a habit of sprinkling files and registry junk all OVER the place. It seems to be a whole bunch of unnecessary work to capture/snapshot an app to find out what it does and then put the appropriate commands into a script, when there'a already a pre-prepared uninstall route.
Better to just create script (or CA if working with an MSI) to manually delete every trace of the application, IMHO.
Posted by:
aogilmor
16 years ago
ORIGINAL: VBScab
ORIGINAL: aogilmorOwen, while I tend to agree with you, the problem with that approach is that one must know beforehand exactly what the app does to a workstation. You and I both know that apps have a habit of sprinkling files and registry junk all OVER the place. It seems to be a whole bunch of unnecessary work to capture/snapshot an app to find out what it does and then put the appropriate commands into a script, when there'a already a pre-prepared uninstall route.
Better to just create script (or CA if working with an MSI) to manually delete every trace of the application, IMHO.
Registry junk, yes. Files are usually concentrated in a directory or 3; the app directory, and the system dir and the common files. Just get rid of the app dir, and let the common dir, sys dir and reg keys get overwritten by newer entries. A bit sloppier than I'd like, but I've literally never been successful at implementing the "pre-prepared uninstall route" in a CA. It either throws an error, or it's not silent and starts to throw dialogs. BTW, if you look at some of the vendor CAs that deal with legacy uninstalls (Cisco VPN client comes to mind) they use this mehodology (manual removal) rather than uninstalshield. They don't trust installshield either! I've never seen any a problems resulting from leftover files or reg entries. Either they're just orphaned (again a bit sloppy but no harm in it) or overwritten by the new app version files/reg entries.
But hey, if y'all can get uninstallshield working more power to you! We shall see....
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.