remove unstall.exe und license parts from *.ins
This commit is contained in:
parent
8a1bc06437
commit
6f6f2b58e3
@ -5,15 +5,9 @@
|
||||
|
||||
|
||||
Set $MsiId$ = '{7752600F-70A9-4F03-976D-4BA1555DE580}'
|
||||
Set $UninstallProgram$ = $InstallDir$ + "\uninstall.exe"
|
||||
|
||||
Message "Uninstalling " + $ProductId$ + " ..."
|
||||
|
||||
if FileExists($UninstallProgram$)
|
||||
comment "Uninstall program found, starting uninstall"
|
||||
Winbatch_uninstall
|
||||
sub_check_exitcode
|
||||
endif
|
||||
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "")
|
||||
comment "MSI id " + $MsiId$ + " found in registry, starting msiexec to uninstall"
|
||||
Winbatch_uninstall_msi
|
||||
@ -29,16 +23,6 @@ Registry_uninstall /32Bit
|
||||
comment "Delete program shortcuts"
|
||||
LinkFolder_uninstall
|
||||
|
||||
[Winbatch_uninstall]
|
||||
; Choose one of the following examples as basis for program uninstall
|
||||
;
|
||||
; === Nullsoft Scriptable Install System ================================================================
|
||||
; "$UninstallProgram$" /S
|
||||
;
|
||||
; === Inno Setup ========================================================================================
|
||||
; "$UninstallProgram$" /silent /norestart /SUPPRESSMSGBOXES
|
||||
|
||||
|
||||
[Winbatch_uninstall_msi]
|
||||
msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress
|
||||
|
||||
|
@ -7,15 +7,11 @@
|
||||
requiredWinstVersion >= "4.10.8.6"
|
||||
|
||||
DefVar $MsiId$
|
||||
DefVar $UninstallProgram$
|
||||
DefVar $LogDir$
|
||||
DefVar $ProductId$
|
||||
DefVar $MinimumSpace$
|
||||
DefVar $InstallDir$
|
||||
DefVar $ExitCode$
|
||||
DefVar $LicenseRequired$
|
||||
DefVar $LicenseKey$
|
||||
DefVar $LicensePool$
|
||||
|
||||
Set $LogDir$ = "%SystemDrive%\tmp"
|
||||
|
||||
@ -39,8 +35,6 @@ Set $ProductId$ = "vncmanager"
|
||||
Set $MinimumSpace$ = "1 MB"
|
||||
; the path were we find the product after the installation
|
||||
Set $InstallDir$ = "%ProgramFiles32Dir%\VNC Manager"
|
||||
Set $LicenseRequired$ = "false"
|
||||
Set $LicensePool$ = "p_" + $ProductId$
|
||||
; ----------------------------------------------------------------
|
||||
|
||||
if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
|
||||
@ -58,11 +52,6 @@ else
|
||||
|
||||
Message "Installing " + $ProductId$ + " ..."
|
||||
|
||||
if $LicenseRequired$ = "true"
|
||||
comment "Licensing required, reserve license and get license key"
|
||||
Sub_get_licensekey
|
||||
endif
|
||||
|
||||
comment "Start setup program"
|
||||
Winbatch_install
|
||||
Sub_check_exitcode
|
||||
@ -88,30 +77,9 @@ else
|
||||
endif
|
||||
|
||||
[Winbatch_install]
|
||||
; Choose one of the following examples as basis for your installation
|
||||
; You can use $LicenseKey$ var to pass a license key to the installer
|
||||
;
|
||||
; === Nullsoft Scriptable Install System ================================================================
|
||||
; "%ScriptPath%\Setup.exe" /S
|
||||
;
|
||||
; === MSI package =======================================================================================
|
||||
; You may use the parameter PIDKEY=$Licensekey$
|
||||
msiexec /i "$InstallMsi$" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 REBOOT=ReallySuppress
|
||||
;
|
||||
; === InstallShield + MSI=====================================================================================
|
||||
; Attention: The path to the log file should not contain any whitespaces
|
||||
; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=2 REBOOT=ReallySuppress"
|
||||
; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress"
|
||||
;
|
||||
; === InstallShield =====================================================================================
|
||||
; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss"
|
||||
; "%ScriptPath%\setup.exe" /s /sms /f1"%ScriptPath%\setup.iss" /f2"$LogDir$\$ProductId$.install_log.txt"
|
||||
;
|
||||
; === Inno Setup ========================================================================================
|
||||
; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html
|
||||
; You may create setup answer file by: setup.exe /SAVEINF="filename"
|
||||
; You may use an answer file by the parameter /LOADINF="filename"
|
||||
; "%ScriptPath%\setup.exe" /sp- /silent /norestart /SUPPRESSMSGBOXES
|
||||
|
||||
[Files_install]
|
||||
; Example of recursively copying some files into the installation directory:
|
||||
@ -160,44 +128,6 @@ msiexec /i "$InstallMsi$" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSE
|
||||
; icon_index: 2
|
||||
; end_link
|
||||
|
||||
[Sub_get_licensekey]
|
||||
if opsiLicenseManagementEnabled
|
||||
comment "License management is enabled and will be used"
|
||||
|
||||
comment "Trying to get a license key"
|
||||
Set $LicenseKey$ = demandLicenseKey ($LicensePool$)
|
||||
; If there is an assignment of exactly one licensepool to the product the following call is possible:
|
||||
; Set $LicenseKey$ = demandLicenseKey ("", $ProductId$)
|
||||
;
|
||||
; If there is an assignment of a license pool to a windows software id, it is possible to use:
|
||||
; DefVar $WindowsSoftwareId$
|
||||
; $WindowsSoftwareId$ = "..."
|
||||
; Set $LicenseKey$ = demandLicenseKey ("", "", $WindowsSoftwareId$)
|
||||
|
||||
DefVar $ServiceErrorClass$
|
||||
set $ServiceErrorClass$ = getLastServiceErrorClass
|
||||
comment "Error class: " + $ServiceErrorClass$
|
||||
|
||||
if $ServiceErrorClass$ = "None"
|
||||
comment "Everything fine, we got the license key '" + $LicenseKey$ + "'"
|
||||
else
|
||||
if $ServiceErrorClass$ = "LicenseConfigurationError"
|
||||
LogError "Fatal: license configuration must be corrected"
|
||||
LogError getLastServiceErrorMessage
|
||||
isFatalError
|
||||
else
|
||||
if $ServiceErrorClass$ = "LicenseMissingError"
|
||||
LogError "Fatal: required license is not supplied"
|
||||
isFatalError
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
else
|
||||
LogError "Fatal: license required, but license management not enabled"
|
||||
isFatalError
|
||||
endif
|
||||
|
||||
|
||||
[Sub_check_exitcode]
|
||||
comment "Test for installation success via exit code"
|
||||
set $ExitCode$ = getLastExitCode
|
||||
|
@ -7,13 +7,10 @@
|
||||
requiredWinstVersion >= "4.10.8.6"
|
||||
|
||||
DefVar $MsiId$
|
||||
DefVar $UninstallProgram$
|
||||
DefVar $LogDir$
|
||||
DefVar $ExitCode$
|
||||
DefVar $ProductId$
|
||||
DefVar $InstallDir$
|
||||
DefVar $LicenseRequired$
|
||||
DefVar $LicensePool$
|
||||
|
||||
Set $LogDir$ = "%SystemDrive%\tmp"
|
||||
|
||||
@ -32,8 +29,6 @@ Set $LogDir$ = "%SystemDrive%\tmp"
|
||||
; ----------------------------------------------------------------
|
||||
Set $ProductId$ = "vncmanager"
|
||||
Set $InstallDir$ = "%ProgramFiles32Dir%\VNC Manager"
|
||||
Set $LicenseRequired$ = "false"
|
||||
Set $LicensePool$ = "p_" + $ProductId$
|
||||
; ----------------------------------------------------------------
|
||||
|
||||
|
||||
@ -45,24 +40,4 @@ Message "Uninstalling " + $ProductId$ + " ..."
|
||||
if FileExists("%ScriptPath%\delsub32.ins")
|
||||
comment "Start uninstall sub section"
|
||||
Sub "%ScriptPath%\delsub32.ins"
|
||||
endif
|
||||
|
||||
if $LicenseRequired$ = "true"
|
||||
comment "Licensing required, free license used"
|
||||
Sub_free_license
|
||||
endif
|
||||
|
||||
[Sub_free_license]
|
||||
comment "License management is enabled and will be used"
|
||||
|
||||
comment "Trying to free license used for the product"
|
||||
DefVar $result$
|
||||
Set $result$ = FreeLicense($LicensePool$)
|
||||
; If there is an assignment of a license pool to the product, it is possible to use
|
||||
; Set $result$ = FreeLicense("", $ProductId$)
|
||||
;
|
||||
; If there is an assignment of a license pool to a windows software id, it is possible to use
|
||||
; DefVar $WindowsSoftwareId$
|
||||
; $WindowsSoftwareId$ = "..."
|
||||
; set $result$ = FreeLicense("", "", $WindowsSoftwareId$)
|
||||
|
||||
endif
|
Loading…
Reference in New Issue
Block a user