Fehlermeldung wenn Software bereits installiert

Post Reply
9Made
Posts: 39
Joined: 19. Sep 2022, 08:24
Contact:

Fehlermeldung wenn Software bereits installiert

Post by 9Made » 09. Feb 2023, 17:49

In der Vergangenheit wurde eine ältere 7-Zip-Version (21.00) mit Matrix42 verteilt, aber die neuesten Versionen sind derzeit über das Patch-Management auf den Computern.

Ich habe es bereits getestet und wenn die Software bereits manuell oder über das Patch-Management installiert wurde, funktioniert die Reinstallation nicht.

Bei diesem Problem kann ich die Reinstallation entfernen und auf der Grundlage der vorhandenen Registrierung als erfolgreich installiert anzeigen. Aber dann bleibt die alte Registry von der alten Installation über Matrix42 von 7-Zip noch bestehen.

Wie kann ich dieses Problem am besten lösen?

Code: Select all

[SetupInfo]
Author                  = 
CreationDate            = 
InventoryID             = 
Description             = Igor Pavlov 7-Zip (64-Bit) 22.01.00.0 
Method                  = MSI
Tested on               = Win10 (x64) 
Dependencies            =     
Command line options    = /S0
Last Change             = 
Build                   = 0

[VarDefInfo]
; <Variable>, <Type: 0=Computer 1=User>, <Allow NULL values: 0=No 1=Yes>

[Setup]
Version=14.2
ShowCaption=1
BlockInput=0
Platform=x64

[Requirements]

[Application]
ProductName=7-Zip (64-Bit)
DeveloperName=Igor Pavlov
Version=22.01.00.0
Revision=0
SetupName=%ProductName% %Version% %SetupWizard%
Text1="%ProductName% %Version%",         Arial,           30, , 2170F3, 4,    , LEFT BOLD ITALIC
Text2="%DeveloperName%",                 Arial,           24, , 2170F3, 4,    , LEFT BOLD ITALIC
Text8="%Company%",                       Arial,           18, , 2170F3, 4,  10, RIGHT BOLD ITALIC
Text9="%InstallationFor% %WindowsUser%", Arial,           16, , 2170F3, 4, -18, BOTTOM ITALIC LEFT
BackgroundColor=EFEFEF,000000
CopyDialogRect=0%, 77%, 100%, 100%, HCENTER

; Register all installations in common registry key
UserKeyName=$Matrix42Packages$\%DeveloperName%\%ProductName%
MachineKeyName=$Matrix42Packages$\%DeveloperName%\%ProductName%\%Version%
UninstallKeyName=Matrix42 - %DeveloperName% %ProductName% %Version%
UninstallDisplayName=Matrix42 - %DeveloperName% %ProductName% %Version%
UninstallString=%ReinstallString% /U
ReinstallString="%CommonSetupDir%\Setup.exe" "%App%\%SetupInfDir%\Setup.inf"
;UninstallDisplayIcon="%ApplicationDir%\%SetupInfDir%\Setup.ico",0
UninstallOptions=NOREMOVE NOREPAIR NOMODIFY
ReinstallMode=1
SrcDir=..

; Matrix42 Scripts are copied in a common scripts directory
ApplicationDir=%CommonAppData%\$Matrix42Scripts$\%DeveloperName%\%ProductName%\%Version%

SetupInfDir=Install
DataDir=%Personal%
AskUninstallOld=1
ShellLinks=1
CommonShellLinks=1
CreateUnresolvableShellLinks=1
UseStringSection=Strings:09
UseSysStringSection=SysStrings:09
DateWarning=1
SizeWarning=0
Reboot=0
PreventExternalReboot=1
StartServicesOnReboot=0
CallTimeOut=3600
AbortAfterCallTimeOut=1
DisableCancelButton=1
ShowEndMessage=1
EndMessage=%EndMessageDesc%

[Strings:07]
Disk1=Installationsmedium 1
EndMessageDesc=Die Installation wurde erfolgreich abgeschlossen!
ErrorLogMessage=Die Installation/Deinstallation wurde mit einer Fehlermeldung abgebrochen!
InstallationFor=Installation für:
InstallerDesc=Dienstprogramm zum Installieren einzelner Komponenten.
InstallerName=Installationsprogramm
SetupWizard=Installations-Assistent
Uninstallation=deinstallieren

[Strings:09]
Disk1=Installation media 1
EndMessageDesc=Installation was completed successfully!
ErrorLogMessage=The installation/uninstallation aborted with an error message!
InstallationFor=Installation for:
InstallerDesc=Service program to install single components.
InstallerName=Setup program
SetupWizard=Installation Wizard
Uninstallation=Uninstallation

[SysStrings:07]
Users=Benutzer

[SysStrings:09]
Users=Users

[Environment]
V_MSIInstallerID=96F071321C0420722210000010000000
ReInstSuccessMessage1031=Die Konfiguration wurde erfolgreich abgeschlossen.
ReInstSuccessMessage1031_1=Die Konfiguration wurde abgeschlossen.
ReInstSuccessMessage1033=Configuration completed successfully.
ReInstSuccessMessage1033_1=Configuration completed.
MSILogFile=%Temp%\MSI_%ProductName%.%Version%.%Revision%.log
CommonSetupDir=%CommonFilesDir%\Setup%SetupBits%
V_MachineValuesPath=\\%EmpirumServer%\Values$\MachineValues\%DomainName%
V_UserValuesPath=%HKLM,"Software\matrix42\Software Depot","HomeServer"%\Values$\UserValues\%UserDomain%

; Maschinenabhängige Variablen
; machine dependent variables
;VM_<Variable>=%%%V_MachineValuesPath%\%ComputerName%.ini,%ComputerName%,<Variable>%%

; Userabhängige Variablen
; user dependent variables
;VU_<Variable>=%%%V_UserValuesPath%\%WindowsUser%.ini,%WindowsUser%,<Variable>%%

; !!! Setzen der entsprechenden ReplaceEnv Befehle für die Variablen im Abschnitt [Product] nicht vergessen!!!
; !!! Don't forget to set the appropriate ReplaceEnv instructions for the variables in the section [Product]!!!

[Encryption]

[Processes]
7-ZIP=7zFM.exe, 7-Zip File Manager, KillProcess

[Disks]
1=%Disk1%

[Options]
Installer = %InstallerName%, COPYALWAYS, Installer, "%InstallerDesc%"
Product   = %ProductName%,   COPYALWAYS, Product,   "%ProductDesc%"

[Installer]
1:..\..\..\..\User\Setup.exe,          %CommonSetupDir%, OPTIONAL USEFILENAME DIRECTORY NOSIZEWARNING SETUP, 0
1:..\..\..\..\User\SetupDeu.chm,       %CommonSetupDir%, OPTIONAL USEFILENAME DIRECTORY NOSIZEWARNING SETUP, 0
1:..\..\..\..\User\SetupEnu.chm,       %CommonSetupDir%, OPTIONAL USEFILENAME DIRECTORY NOSIZEWARNING SETUP, 0
1:%Temp%\Setup64.exe,                  %CommonSetupDir%\Setup.exe, OPTIONAL ALWAYS NOSIZEWARNING SETUP WINDOWS64,     0
1:..\..\..\..\User\Setup64.exe,        %CommonSetupDir%\Setup.exe, OPTIONAL ALWAYS NOSIZEWARNING SETUP WINDOWS64,     0
1:%SetupInfDir%\Setup.inf,                             , ALWAYS,                                             0
1:%SetupInfDir%\Setup.ico,                             , NORMAL,                                           0
; 1:%SetupInfDir%\Logo.bmp,                              , NORMAL,                                           0

[Product]
; ReplaceEnv <Variable>

#Set:Product, DONTDELETE
#Set:Uninstall, DELETE
#Set:ChangeMSISourcelist, DONTDELETE
;#Shell:Product

[Set:Product]
AddMeter -1
Del "%MSILogFile%"
If DoesRegKeyExist ("HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{23170F69-40C1-2702-2201-000001000000},UnInstallString") == "1" | DoesRegKeyExist ("HKLM,SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{23170F69-40C1-2702-2201-000001000000},UnInstallString") == "1" Then "RepairMSI" Else "InstallMSI" EndIf

[RepairMSI]
AddMeter -1
AskKillProcesses 20, 7-ZIP
Sleep 2000
Call MsiExec /Fvomus "%SRC%\Files\7z2201-x64.msi" ALLUSERS="1" REBOOT=REALLYSUPPRESS ARPSYSTEMCOMPONENT=1 /qn /Li "%MSILogFile%"
Sleep 2000
If %ErrorLevel% == "3010" Then "RebootRequired" EndIf
Sleep 5000
If DoesTextInFileExist ("%ReInstSuccessMessage1031%", "%MSILogFile%") == "0" & DoesTextInFileExist ("%ReInstSuccessMessage1031_1%", "%MSILogFile%") == "0" & DoesTextInFileExist ("%ReInstSuccessMessage1033%", "%MSILogFile%") == "0" & DoesTextInFileExist ("%ReInstSuccessMessage1033_1%", "%MSILogFile%") == "0" Then "AbortMSIInst" EndIf
Del "%MSILogFile%"

[InstallMSI]
AddMeter -1
AskKillProcesses 20, 7-ZIP
Sleep 2000
Call MsiExec /I "%SRC%\Files\7z2201-x64.msi" ALLUSERS="1" REBOOT=REALLYSUPPRESS ARPSYSTEMCOMPONENT=1 /qn /Li "%MSILogFile%"
Sleep 2000
If %ErrorLevel% == "3010" Then "RebootRequired" EndIf
Sleep 5000
If DoesRegKeyExist ("HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{23170F69-40C1-2702-2201-000001000000},UnInstallString") == "0" & DoesRegKeyExist ("HKLM,SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{23170F69-40C1-2702-2201-000001000000},UnInstallString") == "0" Then "AbortMSIInst" EndIf
Del "%MSILogFile%"

[Set:Uninstall]
-Del "%MSILogFile%"
If DoesRegKeyExist ("HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{23170F69-40C1-2702-2201-000001000000},UnInstallString") == "1" | DoesRegKeyExist ("HKLM,SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{23170F69-40C1-2702-2201-000001000000},UnInstallString") == "1" Then "AbortMSIUnInst" EndIf
-Sleep 5000
If %ErrorLevel% == "3010" Then "RebootRequired" EndIf
-Call MsiExec /X {23170F69-40C1-2702-2201-000001000000} REBOOT=REALLYSUPPRESS /qn /Li "%MSILogFile%"
-Sleep 5000
-AskKillProcesses 20, 7-ZIP
-AddMeter -1

[RebootRequired]
SetReboot 1
-SetReboot 1

[AbortMSIInst]
Set ErrorOutput=%ErrorLogMessage% ErrorLevel: %ErrorLevel%
ErrorLogMsg %ErrorOutput%
Abort %ErrorOutput%

[AbortMSIUnInst]
Set ErrorOutput=%ErrorLogMessage% ErrorLevel: %ErrorLevel%
ErrorLogMsg %ErrorOutput%
Abort %ErrorOutput%
-Abort %ErrorOutput%
-ErrorLogMsg %ErrorOutput%
-Set ErrorOutput=%ErrorLogMessage% ErrorLevel: %ErrorLevel%

[SET:ChangeMSISourcelist]
ReplaceRegValue (HKCR,"Installer\Products\%V_MSIInstallerID%\Sourcelist","LastUsedSource","\\%EmpirumServer%","\\%%EmpirumServer%%", 1)
ReplaceRegValue (HKCR,"Installer\Products\%V_MSIInstallerID%\Sourcelist\Net","1","\\%EmpirumServer%","\\%%EmpirumServer%%", 1)

[Shell:Product]

User avatar
Hendrik_Ambrosius
Moderator
Moderator
Posts: 7969
Joined: 13. Dec 2004, 23:10
Location: Adendorf/Lüneburg

Re: Fehlermeldung wenn Software bereits installiert

Post by Hendrik_Ambrosius » 13. Feb 2023, 08:57

Einfach die RegKeys löschen nach der Installation des neuen Pakets?

[Reg:Remove]
-HKLM,"Software\...
Hendrik Ambrosius / Senior Presales Consultant
Mobile: +49 172 408 4447 | hendrik.ambrosius@matrix42.com
Matrix42 GmbH | Elbinger Straße 7 | 60487 Frankfurt am Main | Germany | www.matrix42.com

Disclaimer: I participate in this forum on a voluntary basis. Views expressed are not necessarily those of Matrix42 or of the support team.

Post Reply

Return to “Paketierung”

Who is online

Users browsing this forum: No registered users and 3 guests