habe hier ein Paket, welches mir etwas Probleme macht. Es lässt sich nicht installieren. Im Error-Log erhalte ich die Fehlermeldung das setup.exe mit dem Error 0 abschliesst. Also keine erfolreiche Installation.
In meinem Paket wollte ich nun eine If-Abfrage einbauen, wie ich sie hier im Forum gefunden habe:
Code: Select all
If %ErrorLevel% <> "0" Then "SET:InstallationError" EndIf
Code: Select all
[SetupInfo]
Author =
CreationDate =
InventoryID =
Description =
Method = Unattended
Tested on = XP
Dependencies =
Command line options = /S2
Last Change =
Build =
[VarDefInfo]
; <Variable>, <Type: 0=Computer 1=User>, <Allow NULL values: 0=No 1=Yes>
[Setup]
Version=10.5
ShowCaption=1
BlockInput=0
[Requirements]
[Application]
ProductName=NCP Secure Client
ProductNameShort=NCP Secure Client
Version=9.21.064
VersionDirSuffix=100
Revision=0
ServiceRelease=0
DeveloperName=NCP
DeveloperNameShort=
SetupName=%ProductName% %Version% %SetupWizard%
Text1="%ProductName% %Version%", Arial, 30, , 00FFFF, 4, , LEFT BOLD ITALIC
Text2="%DeveloperName%", Arial, 24, , 00FFFF, 4, , LEFT BOLD ITALIC
Text8="%Company%", Arial, 18, , 00FFFF, 4, 10, RIGHT BOLD ITALIC
Text9="%InstallationFor% %WindowsUser%", Arial, 14, , 007F00, 4, -14, BOTTOM ITALIC LEFT
BackgroundColor=FF0000,000000
BackgroundPicture=
BackgroundSound=
Logo=
WizardPicture=
CopyDialogRect=0%, 0%, 100%, 100%, HCENTER VCENTER
PrecopyFiles=
UserKeyName=%DeveloperName%\%ProductName%
MachineKeyName=%DeveloperName%\%ProductName%\%Version%
UninstallKeyName=%DeveloperName% %ProductName% %Version%
UninstallDisplayName=%ProductName% %Version%
UninstallString=%ReinstallString% /U
ReinstallString="%CommonSetupDir%\Setup.exe" "%App%\%SetupInfDir%\NCPSecureClient9.21.064.inf"
ReinstallMode=1
HideUninstall=0
SrcDir=..
ApplicationDir=%ProgramFilesDir%\NCP
SetupInfDir=Install
DataDir=%Personal%
DefaultUser=
DefaultCompany=
Prompts=
RunIfInstalled=
Readme=
Execute=
Expand=0
CopyExistingFiles=0
AskUninstallOld=1
AskLicence=0
AskInfo=0
AskFromCD=0
AskShared=1
AskMode=0
AskDir=0
AskDataDir=0
AskUser=0
UseUser=0
UseCompany=1
UseProductID=0
ProductIDLength=0
UseProductIDPerOption=0
UseCheckmarks=2
AutoIniFileMapping=0
ShellLinks=1
CommonShellLinks=0
CreateUnresolvableShellLinks=1
ShowShellFolder=
LicenceText=
InfoText=
RequirementsText=
UseStringSection=Strings:09
UseSysStringSection=SysStrings:09
PrintServer=
PrintEnvironment=
DateWarning=1
SizeWarning=1
Reboot=0
PreventExternalReboot=0
StartServicesOnReboot=0
CallTimeOut=3600
AbortAfterCallTimeOut=1
ReplaceRunOnce=0
DisableCancelButton=1
ShowEndMessage=1
EndMessage=%EndMessageDesc%
SetupExtDll=
SetupHookFunc=
ShowFullPath=0
[Admin]
AdminSetup=0
ApplicationDir=
AskDir=1
AskOptions=0
ClientSrcDir=Client
UninstallString=%ReinstallString% /U
ReinstallString="%Src%\..\..\..\..\User\Setup.exe" "%Src%\%SetupInfDir%\NCPSecureClient9.21.064.inf"
[Client]
ClientDir=
AskDir=0
AskOptions=1
Reboot=0
UseUninstallStringFromApplication=1
InstallAtLast=0
[Workstation]
AskOptions=0
AdminUninstallLink=0
AdminUninstallLinkName=%ProductName% %Version%
UserSetupLink=0
UserSetupLinkName=%ProductName% %Version%
[Strings:07]
Disk1=Diskette 1: Installationsdiskette
EndMessageDesc=Die Installation wurde erfolgreich abgeschlossen!
InstallationFor=Installation für:
InstallerDesc=Dienstprogramm zum Installieren einzelner Komponenten.
InstallerName=Installationsprogramm
ProductDesc=
SetupWizard=Installations-Assistent
Uninstallation=deinstallieren
ErrorText=Fehler
CallingText=beim Aufruf von
[Strings:09]
Disk1=Diskette 1: Installation disk
EndMessageDesc=Installation was completed successfully!
InstallationFor=Installation for:
InstallerDesc=Service program to install single components.
InstallerName=Setup program
ProductDesc=
SetupWizard=Installation Wizard
Uninstallation=Uninstallation
ErrorText=Error
CallingText=launching
[SysStrings:07]
Users=Benutzer
[SysStrings:09]
Users=Users
[Environment]
CommonSetupDir=%CommonFilesDir%\Setup%SetupBits%
V_MachineValuesPath=%SoftwareDepotServerName%\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]!!!
[Prompts]
[Services]
[Processes]
NCPMon=NCPMON.EXE, NCP Monitor, KILLPROCESS ABORT
[EventSources]
[Encryption]
[Disks]
1=%Disk1%
[UserKeyNames]
[Icons]
Product = %ProductNameShort%.ico, 0, 000000, ICON
[Options]
Installer = %InstallerName%, COPYALWAYS, Installer, "%InstallerDesc%"
Product = %ProductName%, COPYALWAYS, Product, "%ProductDesc%"
[OptionDependencies]
[OptionGroups]
[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:..\..\..\..\User\Mx42SynSem.dll, %System%, OPTIONAL USEFILENAME DIRECTORY NOSIZEWARNING SETUP, 0
1:%SetupInfDir%\NCPSecureClient9.21.064.inf, , NORMAL, 0
[FileCheckMachine]
ReplaceEnv V_MachineValuesPath
If DoesFileExist ("%V_MachineValuesPath%\%ComputerName%.ini") == "0" Then "FileIsntThere" EndIf
[FileCheckClient]
ReplaceEnv V_UserValuesPath
If "%UserDomain%" <> "%ComputerName%" Then "CheckClientFile" EndIf
[CheckClientFile]
If DoesFileExist ("%V_UserValuesPath%\%WindowsUser%.ini") == "0" Then "FileIsntThere" EndIf
[FileIsntThere]
ErrorLogMsg <Error Text>
Abort
[Product]
;#FileCheckMachine, MACHINE
;#FileCheckClient, CLIENT
;ReplaceEnv <Variable>
;AskKillProcesses 600, NCPMon
#Set:Product, DONTDELETE
;#Set:Installation, DONTDELETE
#Set:Deinstallation, DELETE
#Reg:OnUninstallProduct, DELETE
#Reg:Product
#Ini:Product
#Security:Product
;-AskKillProcesses 600, NCPMon
[Set:Product]
IF DoesRegKeyExist ("HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\NCP RWS/GA,UninstallString") == "1" Then "Set:Repair" Else "Set:Installation" EndIf
Set ResultCode=%%%Temp%\%DeveloperName%_%ProductName%_%Version%.log,ResponseResult,ResultCode%%
ReplaceEnv ResultCode
If %ResultCode% <> "0" Then "SET:InstallationError" EndIf
SetReboot 1
[SET:Installation]
"%SRC%\Source\TreiberBestaetigung.exe"
; Call cmd /c rd %ProgramFiles%\ncp /s /q
AddMeter -1
Call "%SRC%\Source\Setup.exe" -s -SMS -f1"%SRC%\Source\install.iss" -f2"%Temp%\%DeveloperName%_%ProductName%_%Version%.log"
KillProcess TreiberBestaetigung.exe
[SET:Repair]
AddMeter -1
Call "%SRC%\Source\Setup.exe" -s -SMS -f1"%SRC%\Source\repair.iss" -f2"%Temp%\%DeveloperName%_%ProductName%_%Version%.log"
SetReboot 1
[SET:Deinstallation]
SetReboot 1
-call "%ProgramFiles%\NCP\SecureClient\uninst.exe" -silent
-AddMeter -1
[Reg:OnUninstallProduct]
[Reg:Product]
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\NCP RWS/GA","SystemComponent",0x00010001,1
[Ini:Product]
[Security:Product]
[Shell:Installer]
[Shell:Product]
[SET:InstallationError]
ErrorLogMsg %ErrorText% %ErrorLevel% %CallingText% setup.exe
Abort
[SET:DeInstallationError]
-Abort
-ErrorLogMsg %ErrorText% %ErrorLevel% %CallingText% setup.exe
Habe es bereits bei SET:Installation probiert, leider kein Erfolg gehabt
Viele Grüße
Klaus