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?
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)
Please log in to answer
Posted by:
anonymous_9363
14 years ago
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.
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
Posted by:
anonymous_9363
14 years ago
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
thanks
i chose InstallShield open 7-zip.msi installer and create CA that execute VBS
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
Posted by:
cygan
14 years ago
Posted by:
karapetyan
14 years ago
Posted by:
pjgeutjens
14 years ago
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
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
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.
so that the conversation will remain readable.