/build/static/layout/Breadcrumb_cap_w.png

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.

0 Comments   [ + ] Show comments

Answers (7)

Posted by: anonymous_9363 16 years ago
Red Belt
0
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: SKS 16 years ago
Orange Belt
0
If i had to place a /qb! , where is it best to put it ?
Posted by: anonymous_9363 16 years ago
Red Belt
0
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!):

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: SKS 16 years ago
Orange Belt
0
Thnx for ur help .


/sks
Posted by: aogilmor 16 years ago
9th Degree Black Belt
0
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
Red Belt
0
ORIGINAL: aogilmor
Better to just create script (or CA if working with an MSI) to manually delete every trace of the application, IMHO.
Owen, 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.
Posted by: aogilmor 16 years ago
9th Degree Black Belt
0
ORIGINAL: VBScab

ORIGINAL: aogilmor
Better to just create script (or CA if working with an MSI) to manually delete every trace of the application, IMHO.
Owen, 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.



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.

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:

Share

 
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