remove nit used parts from *.ins
This commit is contained in:
parent
bbeb1af112
commit
a3088b2034
@ -6,15 +6,9 @@
|
||||
|
||||
Set $MsiIdConv$ = '{90120000-0020-0407-0000-0000000FF1CE}'
|
||||
Set $MsiId$ = '{90850407-6000-11D3-8CFE-0150048383C9}'
|
||||
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\" + $MsiIdConv$ + "] DisplayName") = "")
|
||||
comment "MSI id " + $MsiIdConv$ + " found in registry, starting msiexec to uninstall"
|
||||
Winbatch_uninstall_msi_conv
|
||||
@ -35,16 +29,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
|
||||
|
||||
|
||||
[Winbatch_uninstall_msi_conv]
|
||||
msiexec /x $MsiIdConv$ /qb! REBOOT=ReallySuppress
|
||||
|
||||
|
@ -8,15 +8,11 @@ requiredWinstVersion >= "4.10.8.6"
|
||||
|
||||
DefVar $MsiId$
|
||||
DefVar $MsiIdConv$
|
||||
DefVar $UninstallProgram$
|
||||
DefVar $LogDir$
|
||||
DefVar $ProductId$
|
||||
DefVar $MinimumSpace$
|
||||
DefVar $InstallDir$
|
||||
DefVar $ExitCode$
|
||||
DefVar $LicenseRequired$
|
||||
DefVar $LicenseKey$
|
||||
DefVar $LicensePool$
|
||||
|
||||
Set $LogDir$ = "%SystemDrive%\tmp"
|
||||
|
||||
@ -33,8 +29,6 @@ Set $ProductId$ = "wdviewer"
|
||||
Set $MinimumSpace$ = "150 MB"
|
||||
; the path were we find the product after the installation
|
||||
Set $InstallDir$ = "%ProgramFiles32Dir%\Microsoft Office\OFFICE11"
|
||||
Set $LicenseRequired$ = "false"
|
||||
Set $LicensePool$ = "p_" + $ProductId$
|
||||
; ----------------------------------------------------------------
|
||||
|
||||
if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
|
||||
@ -52,11 +46,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
|
||||
@ -82,14 +71,8 @@ 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
|
||||
;
|
||||
; === MSI package =======================================================================================
|
||||
; You may use the parameter PIDKEY=$Licensekey$
|
||||
"$InstallExe$" /quiet /passive /norestart
|
||||
"$InstallConvExe$" /q /norestart
|
||||
;
|
||||
|
||||
[Files_install]
|
||||
; Example of recursively copying some files into the installation directory:
|
||||
@ -138,44 +121,6 @@ endif
|
||||
; 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
|
||||
|
@ -8,13 +8,10 @@ requiredWinstVersion >= "4.10.8.6"
|
||||
|
||||
DefVar $MsiId$
|
||||
DefVar $MsiIdConv$
|
||||
DefVar $UninstallProgram$
|
||||
DefVar $LogDir$
|
||||
DefVar $ExitCode$
|
||||
DefVar $ProductId$
|
||||
DefVar $InstallDir$
|
||||
DefVar $LicenseRequired$
|
||||
DefVar $LicensePool$
|
||||
|
||||
Set $LogDir$ = "%SystemDrive%\tmp"
|
||||
|
||||
@ -25,8 +22,6 @@ Set $LogDir$ = "%SystemDrive%\tmp"
|
||||
; ----------------------------------------------------------------
|
||||
Set $ProductId$ = "wdviewer"
|
||||
Set $InstallDir$ = "%ProgramFiles32Dir%\Microsoft Office\OFFICE11"
|
||||
Set $LicenseRequired$ = "false"
|
||||
Set $LicensePool$ = "p_" + $ProductId$
|
||||
; ----------------------------------------------------------------
|
||||
|
||||
|
||||
@ -40,29 +35,3 @@ if FileExists("%ScriptPath%\delsub32.ins")
|
||||
Sub "%ScriptPath%\delsub32.ins"
|
||||
endif
|
||||
|
||||
if $LicenseRequired$ = "true"
|
||||
comment "Licensing required, free license used"
|
||||
Sub_free_license
|
||||
endif
|
||||
|
||||
[Sub_free_license]
|
||||
if opsiLicenseManagementEnabled
|
||||
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$)
|
||||
else
|
||||
LogError "Error: licensing required, but license management not enabled"
|
||||
isFatalError
|
||||
endif
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user