/build/static/layout/Breadcrumb_cap_w.png

how change default msi package 7-zip?

The hosts on my network are a mix of 7-Zip (various versions) .exe and .msi based installs. If i do a .msi based install without first uninstalling the .exe version it will leave some files from the .exe based install intact as well as an entry in "Add/Remove Programs".

I want create *.msi package that uninstall existing .exe based installs of 7-Zip before install new version 7-Zip.

I get *.msi installer from 7z465.msi
and i need execute this *.bat-command before install:
%PROGRAMFILES%\7-Zip\Uninstall.exe" /S
how to change the default *.msi 7zip-installer to add the desired functional?

0 Comments   [ + ] Show comments

Answers (10)

Posted by: anonymous_9363 14 years ago
Red Belt
0
If the most up-to-date version you want to install is in MSI format already, you should create a transform to apply against the MSI. In that transform, you would run the uninstall for the previous version via a Custom Action (CA). That CA should be conditioned so that it only runs if the product is currently not installed. If the MSI is of your creation, then simply add the CA directly to the MSI.

Presumably, the ARP entries which are being left behind are ones which don't use Windows Installer GUIDs in the 'HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall' registry branch but which instead use proper names? If so, add the offending entries to the RemoveRegistry table.
Posted by: karapetyan 14 years ago
Senior Yellow Belt
0
VBScab, thanks for reply!
I want use already existing .msi package
What software for trasform that msi and add (CA) you can recomend?
Posted by: anonymous_9363 14 years ago
Red Belt
0
There are, to all intents and purposes, only two players in MSI authoring: the Wise family of products (Altiris/Symantec) and the InstallShield family (Flexera Software). These are not free: in fact, there are quite expensive. You *can* create transforms using a direct editor like Orca (free and part of the Windows Installer SDK) and InstEdit but, given - no offence intended - what I suspect is your low level of proficiency with Windows Installer, I wouldn't recommend that route: they are really tools for those who know their way around an MSI.
Posted by: karapetyan 14 years ago
Senior Yellow Belt
0
thanks
i chose InstallShield open 7-zip.msi installer and create CA that execute VBS

Set oWsh = CreateObject("Wscript.Shell")
Set fso = WScript.CreateObject("Scripting.FileSystemObject")
If fso.FileExists(oWsh.ExpandEnvironmentStrings("%ProgramFiles%")&"\7-Zip\Uninstall.exe") Then
pathtopf = oWsh.ExpandEnvironmentStrings("%ProgramFiles%")
pathtosevenkey = chr(34) & pathtopf & "\7-Zip\Uninstall.exe" & chr(34) & " /S"
MsgBox pathtosevenkey
oWsh.Run pathtosevenkey,1,True
End If
Posted by: karapetyan 14 years ago
Senior Yellow Belt
0
But if i create CA (Execute VBS placed in installer)
executes only first command in VBS...
why?
Posted by: cygan 14 years ago
Fifth Degree Brown Belt
0
ORIGINAL: karapetyan


Set fso = WScript.CreateObject("Scripting.FileSystemObject")



should be

set fso = CreateObject("Scripting.Filesystemobject")

do a search on this forum to find out why wscript object will not run in a custom action
Posted by: karapetyan 14 years ago
Senior Yellow Belt
0
Cygan,
thank you very much!
Posted by: karapetyan 14 years ago
Senior Yellow Belt
0
Guys!
how to make the CA execution only then installing product?
not uninstalling.
Posted by: pjgeutjens 14 years ago
Red Belt
0
add a condition to your CA that says Not Installed

There's more info on CA's, including a section on commonly used conditions in this AppDeploy article.

Hope this helps

PJ
Posted by: karapetyan 14 years ago
Senior Yellow Belt
0
ok, thanks!

Set oWsh = CreateObject("Wscript.Shell")
Set fso = CreateObject("Scripting.Filesystemobject")
ver = fso.GetFileVersion(oWsh.ExpandEnvironmentStrings("%ProgramFiles%")&"\7-Zip\7z.exe")
exist = fso.FileExists(oWsh.ExpandEnvironmentStrings("%ProgramFiles%")&"\7-Zip\Uninstall.exe")
if (ver <> "4.65.0.0" and exist) then
pathtopf = oWsh.ExpandEnvironmentStrings("%ProgramFiles%")
pathtosevenkey = chr(34) & pathtopf & "\7-Zip\Uninstall.exe" & chr(34) & " /S"
oWsh.Run pathtosevenkey,1,True
end if
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