deployment / uninstall Impromptu with vbscript


I got the following problem:
I got a working Cognos impromptu 7.4 MSI package (repackaged by myself with adminstudio) the package works fine after deployment. But, on some computers there is Cognos Impromptu 7.1 installed. These impromptu 7.1 installations are no MSI packages, just installations-by-hand. Unfortunately, uninstall impromptu 7.1 by hand is no option.

I want to at a vbscript in a custom action in our impromptu 7.4 package that wil uninstall version 7.1 of Impromptu.
The trouble is that in the uninstall string are several quotes ("), see below for the uninstall string.

"C:\Program Files\Common Files\Cognos Shared\cer3\Uninstall\uninst.exe" /u "C:\Program Files\Common Files\Cognos Shared\cer3\Uninstall\uninst.ini"

These quotes are a hell in vbscript.

The vbscript i use is:

Set WshShell = WScript.CreateObject("WScript.Shell")
line1 = "C:\Program Files\Common Files\Cognos Shared\cer3\Uninstall\uninst.exe" /u /s "C:\Program Files\Common Files\Cognos Shared\cer3\Uninstall\uninst.ini"
WshShell.Run line1
Set WshShell = Nothing

The error i get is:
line : 3
character: 87
error: end of instruction is expected

I tried multipal quote ""c:\\program fil..../u /s ..."" and even """c:\program fil.../u /s ..."""
I also tried with chr(34)

But nothing is working for me.

Is there a solution to the quotes or is there a other way to uninstall Impromptu 7.1 (silend)?

thanks in advantage.

0 Comments   [ + ] Show comments

Answers (7)

Posted by: anonymous_9363 13 years ago
Red Belt
line1 = Chr(34) & "C:\Program Files\Common Files\Cognos Shared\cer3\Uninstall\uninst.exe" & Chr(34) & " /u /s " & Chr(34) & "C:\Program Files\Common Files\Cognos Shared\cer3\Uninstall\uninst.ini" & Chr(34)But why bother? Why not simple capture the uninstallation to an MSI? Don't forget to ditch any InstallShield junk which the uninstall might put in the registry - uninst.exe/uninst.ini strongly suggests an IS script was used. Or, if you're feeling adventurous, build a virgin MSI and populate the RemoveFile and RemoveRegistry tables with the appropriate entries.
Posted by: paanvimu 13 years ago
Senior Yellow Belt
I used the two-stroke-snapshot technique of adminstudio and the uninstall (configuration, add/remove software).
But the MSI i build does only remove the files in the Impromptu folders and lets the folders stay where they are.

I checked the removefile-table in the direct editor and all the files of impromptu are in this table. Only the folders are not in this table.
In the view "Files and Folders" are the folder of impromptu also not listed.

Is there a way to remove the folders, without the use of a custom-action-vbscript? Or is this by default. When i think about it, normaly people don't use MSI to uninstall "by-hand-installations".
Posted by: jcarri06 13 years ago
Senior Purple Belt
How come you're trying to create an MSI uninstaller if the application already has an uninstall exe? Is the uninstall.exe not doing enough clean up for you?

- J
Posted by: paanvimu 13 years ago
Senior Yellow Belt
I need to do a silent uninstall, but even with the parameters /u /s the uninstall is not silent. i have searched the internet but i can only find that impromptu version 7.2 is supporting silent uninstall.
I have tried the command line, given by VBScab, but it does not do a silent uninstall. Thats why i build a MSI to uninstall impromptu 7.1
Posted by: aogilmor 13 years ago
9th Degree Black Belt
Man, all o' y'all are talkin' crazy...there's a reason I dread reading posts like this.
Posted by: anonymous_9363 13 years ago
Red Belt
Is there a way to remove the folders Go back to MSDN and READ what it says about the RemoveFiles table http://msdn.microsoft.com/en-us/library/aa371201(VS.85).aspx
Posted by: paanvimu 13 years ago
Senior Yellow Belt
@VBScab Thanks fot the advise
I never thought about to build a MSU (MicroSoft Uninstaller).
I wil try it tomorrow.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
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