deployment / uninstall Impromptu with vbscript
Hello,
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:
'BEGIN SCRIPT
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
'END SCRIPT
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.
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:
'BEGIN SCRIPT
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
'END SCRIPT
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)
Please log in to answer
Posted by:
anonymous_9363
15 years ago
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
15 years ago
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".
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
15 years ago
Posted by:
paanvimu
15 years ago
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
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
15 years ago
Posted by:
anonymous_9363
15 years ago
Is there a way to remove the foldersGo 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
15 years ago
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.