From d5b24c79c604179d0b3b2b5dabedcd0b3eea9c72 Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Sun, 26 Feb 2012 17:44:31 +0100 Subject: [PATCH] remove not used parts of *.ins --- CLIENT_DATA/delsub32.ins | 11 -------- CLIENT_DATA/setup32.ins | 52 ------------------------------------- CLIENT_DATA/uninstall32.ins | 31 ---------------------- 3 files changed, 94 deletions(-) diff --git a/CLIENT_DATA/delsub32.ins b/CLIENT_DATA/delsub32.ins index 8156a0d..3e5b03c 100644 --- a/CLIENT_DATA/delsub32.ins +++ b/CLIENT_DATA/delsub32.ins @@ -4,7 +4,6 @@ ; credits: http://www.opsi.org/credits/ -Set $MsiId$ = '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}' Set $UninstallProgram$ = $InstallDir$ + "\unins000.exe" Message "Uninstalling " + $ProductId$ + " ..." @@ -16,11 +15,6 @@ if FileExists($UninstallProgram$) 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 - sub_check_exitcode -endif comment "Delete files" Files_uninstall /32Bit @@ -32,17 +26,12 @@ comment "Delete program shortcuts" LinkFolder_uninstall [Dosbatch_uninstall] -; Choose one of the following examples as basis for program uninstall -; ; PuTTY 0.58+ uninstallers call 'putty -cleanup-during-uninstall' during uninstall. This causes a pop-up to appear which breaks the silent uninstall. copy /Y "%System%\print.exe" "$InstallDir$\putty.exe" [Winbatch_uninstall] "$UninstallProgram$" /sp- /verysilent /norestart -[Winbatch_uninstall_msi] -msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress - [Files_uninstall] ; Example for recursively deleting the installation directory (don't forget the trailing backslash): ; diff --git a/CLIENT_DATA/setup32.ins b/CLIENT_DATA/setup32.ins index b3ad3c4..25fb1c0 100644 --- a/CLIENT_DATA/setup32.ins +++ b/CLIENT_DATA/setup32.ins @@ -6,16 +6,12 @@ [Actions] 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" @@ -32,8 +28,6 @@ Set $ProductId$ = "putty" Set $MinimumSpace$ = "10 MB" ; the path were we find the product after the installation Set $InstallDir$ = "%ProgramFiles32Dir%\PuTTY" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ ; ---------------------------------------------------------------- if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) @@ -51,11 +45,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 @@ -81,9 +70,6 @@ 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 -; "$InstallExe$" /sp- /verysilent [Files_install] @@ -133,44 +119,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 diff --git a/CLIENT_DATA/uninstall32.ins b/CLIENT_DATA/uninstall32.ins index c55e01a..877ed77 100644 --- a/CLIENT_DATA/uninstall32.ins +++ b/CLIENT_DATA/uninstall32.ins @@ -6,14 +6,11 @@ [Actions] 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" @@ -22,8 +19,6 @@ Set $LogDir$ = "%SystemDrive%\tmp" ; ---------------------------------------------------------------- Set $ProductId$ = "putty" Set $InstallDir$ = "%ProgramFiles32Dir%\PuTTY" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ ; ---------------------------------------------------------------- @@ -37,29 +32,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 - - -