From 4f2b64d8c79eb363bd7e32f13db813334708b64d Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Thu, 19 Sep 2019 17:23:23 +0200 Subject: [PATCH] Add new template and add modified verison with Old-Msi Old-Installer support --- .../{delsub32.ins => delsub32.opsiscript} | 31 +- .../{delsub3264.ins => delsub3264.opsiscript} | 74 ++-- .../{delsub64.ins => delsub64.opsiscript} | 39 +- .../{login.ins => login.opsiscript} | 0 .../{setup32.ins => setup32.opsiscript} | 18 +- .../{setup3264.ins => setup3264.opsiscript} | 26 +- .../{setup64.ins => setup64.opsiscript} | 18 +- ...uninstall32.ins => uninstall32.opsiscript} | 10 +- ...stall3264.ins => uninstall3264.opsiscript} | 12 +- ...uninstall64.ins => uninstall64.opsiscript} | 10 +- sample/All/OPSI/control | 12 +- sample/All/builder-product.cfg | 29 +- sample/builder-product.cfg | 36 -- sample/control | 23 -- .../CLIENT_DATA/localsetup/Thumbs.db | Bin 0 -> 5120 bytes .../CLIENT_DATA/localsetup/delsub.opsiscript | 94 +++++ .../CLIENT_DATA/localsetup/opsi-template.png | Bin 0 -> 77186 bytes .../CLIENT_DATA/localsetup/setup32.opsiscript | 209 +++++++++++ .../localsetup/uninstall.opsiscript | 66 ++++ .../CLIENT_DATA/opsi-template-with-admin.png | Bin 0 -> 77186 bytes .../CLIENT_DATA/opsi.bmp | Bin 0 -> 76854 bytes .../CLIENT_DATA/setup.opsiscript | 354 ++++++++++++++++++ .../OPSI/changelog.txt | 114 ++++++ .../opsi-template-with-admin/OPSI/control | 34 ++ .../opsi-template-with-admin/OPSI/postinst | 9 + .../opsi-template-with-admin/OPSI/preinst | 10 + .../CLIENT_DATA/3264/delsub3264.opsiscript | 143 +++++++ .../CLIENT_DATA/3264/setup3264.opsiscript | 275 ++++++++++++++ .../CLIENT_DATA/3264/uninstall3264.opsiscript | 70 ++++ .../32advanced/delsub32.opsiscript | 105 ++++++ .../CLIENT_DATA/32advanced/setup32.opsiscript | 217 +++++++++++ .../32advanced/uninstall32.opsiscript | 63 ++++ .../CLIENT_DATA/64/delsub64.opsiscript | 97 +++++ .../CLIENT_DATA/64/setup64.opsiscript | 213 +++++++++++ .../CLIENT_DATA/64/uninstall64.opsiscript | 60 +++ .../CLIENT_DATA/delsub32.opsiscript | 95 +++++ .../CLIENT_DATA/login.opsiscript | 24 ++ .../CLIENT_DATA/opsi-template.png | Bin 0 -> 16993 bytes .../CLIENT_DATA/setup32.opsiscript | 226 +++++++++++ .../CLIENT_DATA/uninstall32.opsiscript | 59 +++ .../use_include/delsub_short32.opsiscript | 67 ++++ .../use_include/setup_short32.opsiscript | 149 ++++++++ .../use_include/uninstall_short32.opsiscript | 59 +++ .../source/4.0.6/opsi-template/OPSI/control | 248 ++++++++++++ .../source/4.0.6/opsi-template/OPSI/postinst | 9 + .../source/4.0.6/opsi-template/OPSI/preinst | 9 + 46 files changed, 3232 insertions(+), 184 deletions(-) rename sample/All/CLIENT_DATA/{delsub32.ins => delsub32.opsiscript} (82%) rename sample/All/CLIENT_DATA/{delsub3264.ins => delsub3264.opsiscript} (75%) rename sample/All/CLIENT_DATA/{delsub64.ins => delsub64.opsiscript} (75%) rename sample/All/CLIENT_DATA/{login.ins => login.opsiscript} (100%) rename sample/All/CLIENT_DATA/{setup32.ins => setup32.opsiscript} (94%) rename sample/All/CLIENT_DATA/{setup3264.ins => setup3264.opsiscript} (94%) rename sample/All/CLIENT_DATA/{setup64.ins => setup64.opsiscript} (94%) rename sample/All/CLIENT_DATA/{uninstall32.ins => uninstall32.opsiscript} (92%) rename sample/All/CLIENT_DATA/{uninstall3264.ins => uninstall3264.opsiscript} (92%) rename sample/All/CLIENT_DATA/{uninstall64.ins => uninstall64.opsiscript} (92%) delete mode 100644 sample/builder-product.cfg delete mode 100644 sample/control create mode 100644 sample/source/4.0.6/opsi-template-with-admin/CLIENT_DATA/localsetup/Thumbs.db create mode 100644 sample/source/4.0.6/opsi-template-with-admin/CLIENT_DATA/localsetup/delsub.opsiscript create mode 100644 sample/source/4.0.6/opsi-template-with-admin/CLIENT_DATA/localsetup/opsi-template.png create mode 100644 sample/source/4.0.6/opsi-template-with-admin/CLIENT_DATA/localsetup/setup32.opsiscript create mode 100644 sample/source/4.0.6/opsi-template-with-admin/CLIENT_DATA/localsetup/uninstall.opsiscript create mode 100644 sample/source/4.0.6/opsi-template-with-admin/CLIENT_DATA/opsi-template-with-admin.png create mode 100644 sample/source/4.0.6/opsi-template-with-admin/CLIENT_DATA/opsi.bmp create mode 100644 sample/source/4.0.6/opsi-template-with-admin/CLIENT_DATA/setup.opsiscript create mode 100644 sample/source/4.0.6/opsi-template-with-admin/OPSI/changelog.txt create mode 100644 sample/source/4.0.6/opsi-template-with-admin/OPSI/control create mode 100644 sample/source/4.0.6/opsi-template-with-admin/OPSI/postinst create mode 100644 sample/source/4.0.6/opsi-template-with-admin/OPSI/preinst create mode 100644 sample/source/4.0.6/opsi-template/CLIENT_DATA/3264/delsub3264.opsiscript create mode 100644 sample/source/4.0.6/opsi-template/CLIENT_DATA/3264/setup3264.opsiscript create mode 100644 sample/source/4.0.6/opsi-template/CLIENT_DATA/3264/uninstall3264.opsiscript create mode 100644 sample/source/4.0.6/opsi-template/CLIENT_DATA/32advanced/delsub32.opsiscript create mode 100644 sample/source/4.0.6/opsi-template/CLIENT_DATA/32advanced/setup32.opsiscript create mode 100644 sample/source/4.0.6/opsi-template/CLIENT_DATA/32advanced/uninstall32.opsiscript create mode 100644 sample/source/4.0.6/opsi-template/CLIENT_DATA/64/delsub64.opsiscript create mode 100644 sample/source/4.0.6/opsi-template/CLIENT_DATA/64/setup64.opsiscript create mode 100644 sample/source/4.0.6/opsi-template/CLIENT_DATA/64/uninstall64.opsiscript create mode 100644 sample/source/4.0.6/opsi-template/CLIENT_DATA/delsub32.opsiscript create mode 100644 sample/source/4.0.6/opsi-template/CLIENT_DATA/login.opsiscript create mode 100644 sample/source/4.0.6/opsi-template/CLIENT_DATA/opsi-template.png create mode 100644 sample/source/4.0.6/opsi-template/CLIENT_DATA/setup32.opsiscript create mode 100644 sample/source/4.0.6/opsi-template/CLIENT_DATA/uninstall32.opsiscript create mode 100644 sample/source/4.0.6/opsi-template/CLIENT_DATA/use_include/delsub_short32.opsiscript create mode 100644 sample/source/4.0.6/opsi-template/CLIENT_DATA/use_include/setup_short32.opsiscript create mode 100644 sample/source/4.0.6/opsi-template/CLIENT_DATA/use_include/uninstall_short32.opsiscript create mode 100644 sample/source/4.0.6/opsi-template/OPSI/control create mode 100644 sample/source/4.0.6/opsi-template/OPSI/postinst create mode 100644 sample/source/4.0.6/opsi-template/OPSI/preinst diff --git a/sample/All/CLIENT_DATA/delsub32.ins b/sample/All/CLIENT_DATA/delsub32.opsiscript similarity index 82% rename from sample/All/CLIENT_DATA/delsub32.ins rename to sample/All/CLIENT_DATA/delsub32.opsiscript index 4857753..a6778f6 100644 --- a/sample/All/CLIENT_DATA/delsub32.ins +++ b/sample/All/CLIENT_DATA/delsub32.opsiscript @@ -3,7 +3,6 @@ ; and published under the Terms of the General Public License. ; credits: http://www.opsi.org/en/credits/ - Set $UninstallProgram$ = $InstallDir$ + "\uninstall.exe" Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini" @@ -11,11 +10,13 @@ if FileExists($IniFile$) Set $OLD_VERSION$ = GetValueFromInifile($IniFile$,"COMMON","VERSION","") Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile$,"COMMON","CREATOR_TAG","") Set $OLD_RELEASE$ = GetValueFromInifile($IniFile$,"COMMON","RELEASE","") + Message "Uninstalling " + $ProductId$ + " " + $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " ..." +else + Message "Uninstalling " + $ProductId$ + " ..." endif -Message "Uninstalling " + $ProductId$ + " " + $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " ..." if FileExists($IniFile$) - Set $UninstallProg$ = GetValueFromInifile($IniFile$,"X86","UninstallProg","XXXXXXXX.exe") + Set $UninstallProg$ = GetValueFromInifile($IniFile$,"X86","UninstallProg","XXXXXXXX.exe") Set $UninstallProgramOld$ = $InstallDir$ + $UninstallProg$ if FileExists($UninstallProgramOld$) comment "Uninstall program found, starting uninstall" @@ -30,12 +31,12 @@ if FileExists($UninstallProgram$) endif if FileExists($IniFile$) - Set $MsiIdOld$ = GetValueFromInifile($IniFile$,"X86","MsiId","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") - if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld$ + "] DisplayName") = "") - comment "Old MSI id " + $MsiIdOld$ + " found in registry, starting msiexec to uninstall old version" - Winbatch_uninstall_msi_old - sub_check_exitcode - endif + Set $MsiIdOld$ = GetValueFromInifile($IniFile$,"X86","MsiId","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") + if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld$ + "] DisplayName") = "") + comment "Old MSI id " + $MsiIdOld$ + " found in registry, starting msiexec to uninstall old version" + Winbatch_uninstall_msi_old + sub_check_exitcode + endif 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" @@ -56,31 +57,29 @@ LinkFolder_uninstall ; Choose one of the following examples as basis for program uninstall ; ; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as -; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 +; maybe better called as +; Winbatch_uninstall_old /WaitforProcessending "Au_.exe" /Timeoutseconds 10 ; "$UninstallProgramOld$" /S ; ; === Inno Setup ======================================================================================== ; "$UninstallProgramOld$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - [Winbatch_uninstall] ; Choose one of the following examples as basis for program uninstall ; ; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as +; maybe better called as ; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 ; "$UninstallProgram$" /S ; ; === Inno Setup ======================================================================================== ; "$UninstallProgram$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - [Winbatch_uninstall_msi_old] -msiexec /x $MsiIdOld$ /qb! REBOOT=ReallySuppress +msiexec /x $MsiIdOld$ /qb-! REBOOT=ReallySuppress [Winbatch_uninstall_msi] -msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress +msiexec /x $MsiId$ /qb-! REBOOT=ReallySuppress [Files_uninstall] ; Example for recursively deleting the installation directory: diff --git a/sample/All/CLIENT_DATA/delsub3264.ins b/sample/All/CLIENT_DATA/delsub3264.opsiscript similarity index 75% rename from sample/All/CLIENT_DATA/delsub3264.ins rename to sample/All/CLIENT_DATA/delsub3264.opsiscript index a581c36..7c16d3b 100644 --- a/sample/All/CLIENT_DATA/delsub3264.ins +++ b/sample/All/CLIENT_DATA/delsub3264.opsiscript @@ -12,13 +12,15 @@ Set $IniFile64$ = $InstallDir64$ + "\opsi-" + $ProductId$ + ".ini" if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") if FileExists($IniFile32$) - Set $OLD_VERSION$ = GetValueFromInifile($IniFile32$,"COMMON","VERSION","") - Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile32$,"COMMON","CREATOR_TAG","") - Set $OLD_RELEASE$ = GetValueFromInifile($IniFile32$,"COMMON","RELEASE","") - endif - Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 32 Bit..." + Set $OLD_VERSION$ = GetValueFromInifile($IniFile32$,"COMMON","VERSION","") + Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile32$,"COMMON","CREATOR_TAG","") + Set $OLD_RELEASE$ = GetValueFromInifile($IniFile32$,"COMMON","RELEASE","") + Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 32 Bit..." + else + Message "Uninstalling " + $ProductId$ + " 32 Bit..." + endif - if FileExists($IniFile32$) + if FileExists($IniFile32$) Set $UninstallProg32$ = GetValueFromInifile($IniFile$,"X86","UninstallProg32","XXXXXXXX.exe") Set $UninstallProgramOld32$ = $InstallDir32$ + "\" + $UninstallProg32$ if FileExists($UninstallProgramOld32$) @@ -26,22 +28,21 @@ if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specif Winbatch_uninstall_old_32 sub_check_exitcode endif - endif + endif if FileExists($UninstallProgram32$) comment "Uninstall program found, starting uninstall" Winbatch_uninstall_32 sub_check_exitcode endif - if FileExists($IniFile32$) - Set $MsiIdOld32$ = GetValueFromInifile($IniFile32$,"X86","MsiId32","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") - if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld32$ + "] DisplayName") = "") - comment "Old MSI id " + $MsiIdOld32$ + " found in registry, starting msiexec to uninstall old version" - Winbatch_uninstall_msi_old_32 - sub_check_exitcode - endif - endif - + if FileExists($IniFile32$) + Set $MsiIdOld32$ = GetValueFromInifile($IniFile32$,"X86","MsiId32","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") + if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld32$ + "] DisplayName") = "") + comment "Old MSI id " + $MsiIdOld32$ + " found in registry, starting msiexec to uninstall old version" + Winbatch_uninstall_msi_old_32 + sub_check_exitcode + endif + endif if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId32$ + "] DisplayName") = "") comment "MSI id " + $MsiId32$ + " found in registry, starting msiexec to uninstall" Winbatch_uninstall_msi_32 @@ -56,13 +57,15 @@ endif if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) if FileExists($IniFile64$) - Set $OLD_VERSION$ = GetValueFromInifile($IniFile64$,"COMMON","VERSION","") - Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile64$,"COMMON","CREATOR_TAG","") - Set $OLD_RELEASE$ = GetValueFromInifile($IniFile64$,"COMMON","RELEASE","") - endif - Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 64 Bit..." + Set $OLD_VERSION$ = GetValueFromInifile($IniFile64$,"COMMON","VERSION","") + Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile64$,"COMMON","CREATOR_TAG","") + Set $OLD_RELEASE$ = GetValueFromInifile($IniFile64$,"COMMON","RELEASE","") + Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 64 Bit..." + else + Message "Uninstalling " + $ProductId$ + " 64 Bit..." + endif - if FileExists($IniFile64$) + if FileExists($IniFile64$) Set $UninstallProg64$ = GetValueFromInifile($IniFile$,"X86_64","UninstallProg64","XXXXXXXX.exe") Set $UninstallProgramOld64$ = $InstallDir64$ + "\" + $UninstallProg64$ if FileExists($UninstallProgramOld64$) @@ -70,22 +73,21 @@ if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system spe Winbatch_uninstall_old_64 sub_check_exitcode endif - endif + endif if FileExists($UninstallProgram64$) comment "Uninstall program found, starting uninstall" Winbatch_uninstall_64 sub_check_exitcode endif - if FileExists($IniFile64$) - Set $MsiIdOld64$ = GetValueFromInifile($IniFile64$,"X86_64","MsiId64","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") - if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld64$ + "] DisplayName") = "") - comment "Old MSI id " + $MsiIdOld64$ + " found in registry, starting msiexec to uninstall old version" - Winbatch_uninstall_msi_old_64 - sub_check_exitcode - endif - endif - + if FileExists($IniFile64$) + Set $MsiIdOld64$ = GetValueFromInifile($IniFile64$,"X86_64","MsiId64","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") + if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld64$ + "] DisplayName") = "") + comment "Old MSI id " + $MsiIdOld64$ + " found in registry, starting msiexec to uninstall old version" + Winbatch_uninstall_msi_old_64 + sub_check_exitcode + endif + endif if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId64$ + "] DisplayName") = "") comment "MSI id " + $MsiId64$ + " found in registry, starting msiexec to uninstall" Winbatch_uninstall_msi_64 @@ -125,10 +127,10 @@ LinkFolder_uninstall [Winbatch_uninstall_msi_old_32] -msiexec /x $MsiIdOld32$ /qb! REBOOT=ReallySuppress +msiexec /x $MsiIdOld32$ /qb-! REBOOT=ReallySuppress [Winbatch_uninstall_msi_32] -msiexec /x $MsiId32$ /qb! REBOOT=ReallySuppress +msiexec /x $MsiId32$ /qb-! REBOOT=ReallySuppress [Files_uninstall_32] ; Example for recursively deleting the installation directory (don't forget the trailing backslash): @@ -158,10 +160,10 @@ msiexec /x $MsiId32$ /qb! REBOOT=ReallySuppress ; "$UninstallProgram64$" /silent /norestart /SUPPRESSMSGBOXES /nocancel [Winbatch_uninstall_msi_old_64] -msiexec /x $MsiIdOld64$ /qb! REBOOT=ReallySuppress +msiexec /x $MsiIdOld64$ /qb-! REBOOT=ReallySuppress [Winbatch_uninstall_msi_64] -msiexec /x $MsiId64$ /qb! REBOOT=ReallySuppress +msiexec /x $MsiId64$ /qb-! REBOOT=ReallySuppress [Files_uninstall_64] ; Example for recursively deleting the installation directory: diff --git a/sample/All/CLIENT_DATA/delsub64.ins b/sample/All/CLIENT_DATA/delsub64.opsiscript similarity index 75% rename from sample/All/CLIENT_DATA/delsub64.ins rename to sample/All/CLIENT_DATA/delsub64.opsiscript index 2a521a5..fae9290 100644 --- a/sample/All/CLIENT_DATA/delsub64.ins +++ b/sample/All/CLIENT_DATA/delsub64.opsiscript @@ -8,20 +8,22 @@ Set $UninstallProgram$ = $InstallDir$ + "\uninstall.exe" Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini" if FileExists($IniFile$) - Set $OLD_VERSION$ = GetValueFromInifile($IniFile$,"COMMON","VERSION","") - Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile$,"COMMON","CREATOR_TAG","") - Set $OLD_RELEASE$ = GetValueFromInifile($IniFile$,"COMMON","RELEASE","") + Set $OLD_VERSION$ = GetValueFromInifile($IniFile$,"COMMON","VERSION","") + Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile$,"COMMON","CREATOR_TAG","") + Set $OLD_RELEASE$ = GetValueFromInifile($IniFile$,"COMMON","RELEASE","") + Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " ..." +else + Message "Uninstalling " + $ProductId$ + " ..." endif -Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " ..." if FileExists($IniFile$) - Set $UninstallProg$ = GetValueFromInifile($IniFile$,"X86","UninstallProg","XXXXXXXX.exe") + Set $UninstallProg$ = GetValueFromInifile($IniFile$,"X86","UninstallProg","XXXXXXXX.exe") Set $UninstallProgramOld$ = $InstallDir$ + "\" + $UninstallProg$ - if FileExists($UninstallProgramOld$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall_old - sub_check_exitcode - endif + if FileExists($UninstallProgramOld$) + comment "Uninstall program found, starting uninstall" + Winbatch_uninstall_old + sub_check_exitcode + endif endif if FileExists($UninstallProgram$) comment "Uninstall program found, starting uninstall" @@ -30,12 +32,12 @@ if FileExists($UninstallProgram$) endif if FileExists($IniFile$) - Set $MsiIdOld$ = GetValueFromInifile($IniFile$,"X86_64","MsiId","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") - if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld$ + "] DisplayName") = "") - comment "Old MSI id " + $MsiIdOld$ + " found in registry, starting msiexec to uninstall old version" - Winbatch_uninstall_msi_old - sub_check_exitcode - endif + Set $MsiIdOld$ = GetValueFromInifile($IniFile$,"X86_64","MsiId","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") + if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld$ + "] DisplayName") = "") + comment "Old MSI id " + $MsiIdOld$ + " found in registry, starting msiexec to uninstall old version" + Winbatch_uninstall_msi_old + sub_check_exitcode + endif endif if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "") comment "MSI id " + $MsiId$ + " found in registry, starting msiexec to uninstall" @@ -74,12 +76,11 @@ LinkFolder_uninstall ; === Inno Setup ======================================================================================== ; "$UninstallProgram$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - [Winbatch_uninstall_msi_old] -msiexec /x $MsiIdOld$ /qb! REBOOT=ReallySuppress +msiexec /x $MsiIdOld$ /qb-! REBOOT=ReallySuppress [Winbatch_uninstall_msi] -msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress +msiexec /x $MsiId$ /qb-! REBOOT=ReallySuppress [Files_uninstall] ; Example for recursively deleting the installation directory: diff --git a/sample/All/CLIENT_DATA/login.ins b/sample/All/CLIENT_DATA/login.opsiscript similarity index 100% rename from sample/All/CLIENT_DATA/login.ins rename to sample/All/CLIENT_DATA/login.opsiscript diff --git a/sample/All/CLIENT_DATA/setup32.ins b/sample/All/CLIENT_DATA/setup32.opsiscript similarity index 94% rename from sample/All/CLIENT_DATA/setup32.ins rename to sample/All/CLIENT_DATA/setup32.opsiscript index a9afa4c..4ecca93 100644 --- a/sample/All/CLIENT_DATA/setup32.ins +++ b/sample/All/CLIENT_DATA/setup32.opsiscript @@ -4,10 +4,10 @@ ; credits: http://www.opsi.org/en/credits/ [Actions] -requiredWinstVersion >= "4.11.2.6" +requiredWinstVersion >= "4.11.4.6" +ScriptErrorMessages=off DefVar $MsiIdOld$ -DefVar $UninstallProgram$ DefVar $UninstallProgramOld$ DefVar $IniFile$ DefVar $IniCfgFile$ @@ -23,7 +23,7 @@ DefVar $OLD_VERSION$ DefVar $OLD_CREATOR_TAG$ DefVar $OLD_RELEASE$ -Set $LogDir$ = "%SystemDrive%\tmp" +Set $LogDir$ = "%opsiLogDir%" ; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh ; and adds the following variables: @@ -38,7 +38,7 @@ Set $LogDir$ = "%SystemDrive%\tmp" ; ---------------------------------------------------------------- ; - Please edit the following values - ; ---------------------------------------------------------------- -;$ProductId$ should be the name of the product in opsi +; $ProductId$ should be the name of the product in opsi ; therefore please: only lower letters, no umlauts, ; no white space use '-' as a seperator Set $MinimumSpace$ = "1 MB" @@ -58,9 +58,9 @@ else comment "Show product picture" ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - if FileExists("%ScriptPath%\delsub32.ins") + if FileExists("%ScriptPath%\delsub32.opsiscript") comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub32.ins" + Sub "%ScriptPath%\delsub32.opsiscript" endif Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " ..." @@ -95,12 +95,12 @@ endif ; ; === MSI package ======================================================================================= ; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress +; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb-! ALLUSERS=1 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=1 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" +; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb-! ALLUSERS=1 REBOOT=ReallySuppress" +; "%ScriptPath%\setup.exe" /s /v" /qb-! ALLUSERS=1 REBOOT=ReallySuppress" ; ; === InstallShield ===================================================================================== ; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" diff --git a/sample/All/CLIENT_DATA/setup3264.ins b/sample/All/CLIENT_DATA/setup3264.opsiscript similarity index 94% rename from sample/All/CLIENT_DATA/setup3264.ins rename to sample/All/CLIENT_DATA/setup3264.opsiscript index 0b41e43..32e8e87 100644 --- a/sample/All/CLIENT_DATA/setup3264.ins +++ b/sample/All/CLIENT_DATA/setup3264.opsiscript @@ -4,14 +4,13 @@ ; credits: http://www.opsi.org/en/credits/ [Actions] -requiredWinstVersion >= "4.11.2.6" +requiredWinstVersion >= "4.11.4.6" +ScriptErrorMessages=off DefVar $MsiIdOld32$ -DefVar $UninstallProgram32$ DefVar $UninstallProgramOld32$ DefVar $IniFile32$ DefVar $MsiIdOld64$ -DefVar $UninstallProgram64$ DefVar $UninstallProgramOld64$ DefVar $IniFile64$ DefVar $IniCfgFile$ @@ -33,7 +32,8 @@ DefVar $OLD_RELEASE$ Set $INST_SystemType$ = GetSystemType set $INST_architecture$ = GetProductProperty("install_architecture","system specific") -Set $LogDir$ = "%SystemDrive%\tmp" + +Set $LogDir$ = "%opsiLogDir%" ; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh ; and adds the following variables: @@ -48,7 +48,7 @@ Set $LogDir$ = "%SystemDrive%\tmp" ; ---------------------------------------------------------------- ; - Please edit the following values - ; ---------------------------------------------------------------- -;$ProductId$ should be the name of the product in opsi +; $ProductId$ should be the name of the product in opsi ; therefore please: only lower letters, no umlauts, ; no white space use '-' as a seperator Set $MinimumSpace$ = "1 MB" @@ -69,9 +69,9 @@ else comment "Show product picture" ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - if FileExists("%ScriptPath%\delsub3264.ins") + if FileExists("%ScriptPath%\delsub3264.opsiscript") comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub3264.ins" + Sub "%ScriptPath%\delsub3264.opsiscript" endif if $LicenseRequired$ = "true" @@ -120,12 +120,12 @@ endif ; ; === MSI package ======================================================================================= ; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress +; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb-! ALLUSERS=1 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=1 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" +; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb-! ALLUSERS=1 REBOOT=ReallySuppress" +; "%ScriptPath%\setup.exe" /s /v" /qb-! ALLUSERS=1 REBOOT=ReallySuppress" ; ; === InstallShield ===================================================================================== ; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" @@ -155,12 +155,12 @@ copy "$IniCfgFile$" "$InstallDir32$" ; ; === MSI package ======================================================================================= ; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress +; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb-! ALLUSERS=1 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=1 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" +; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb-! ALLUSERS=1 REBOOT=ReallySuppress" +; "%ScriptPath%\setup.exe" /s /v" /qb-! ALLUSERS=1 REBOOT=ReallySuppress" ; ; === InstallShield ===================================================================================== ; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" diff --git a/sample/All/CLIENT_DATA/setup64.ins b/sample/All/CLIENT_DATA/setup64.opsiscript similarity index 94% rename from sample/All/CLIENT_DATA/setup64.ins rename to sample/All/CLIENT_DATA/setup64.opsiscript index e3172b4..a8cb4cf 100644 --- a/sample/All/CLIENT_DATA/setup64.ins +++ b/sample/All/CLIENT_DATA/setup64.opsiscript @@ -4,10 +4,10 @@ ; credits: http://www.opsi.org/en/credits/ [Actions] -requiredWinstVersion >= "4.11.2.6" +requiredWinstVersion >= "4.11.4.6" +ScriptErrorMessages=off DefVar $MsiIdOld$ -DefVar $UninstallProgram$ DefVar $UninstallProgramOld$ DefVar $IniFile$ DefVar $IniCfgFile$ @@ -23,7 +23,7 @@ DefVar $OLD_VERSION$ DefVar $OLD_CREATOR_TAG$ DefVar $OLD_RELEASE$ -Set $LogDir$ = "%SystemDrive%\tmp" +Set $LogDir$ = "%opsiLogDir%" ; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh ; and adds the following variables: @@ -58,12 +58,12 @@ else comment "Show product picture" ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - if FileExists("%ScriptPath%\delsub64.ins") + if FileExists("%ScriptPath%\delsub64.opsiscript") comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub64.ins" + Sub "%ScriptPath%\delsub64.opsiscript" endif - Message "Installing " + $ProductId$ + " ..." + Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " ..." if $LicenseRequired$ = "true" comment "Licensing required, reserve license and get license key" @@ -95,12 +95,12 @@ endif ; ; === MSI package ======================================================================================= ; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress +; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb-! ALLUSERS=1 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=1 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" +; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb-! ALLUSERS=1 REBOOT=ReallySuppress" +; "%ScriptPath%\setup.exe" /s /v" /qb-! ALLUSERS=1 REBOOT=ReallySuppress" ; ; === InstallShield ===================================================================================== ; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" diff --git a/sample/All/CLIENT_DATA/uninstall32.ins b/sample/All/CLIENT_DATA/uninstall32.opsiscript similarity index 92% rename from sample/All/CLIENT_DATA/uninstall32.ins rename to sample/All/CLIENT_DATA/uninstall32.opsiscript index c040138..60aebbb 100644 --- a/sample/All/CLIENT_DATA/uninstall32.ins +++ b/sample/All/CLIENT_DATA/uninstall32.opsiscript @@ -4,10 +4,10 @@ ; credits: http://www.opsi.org/en/credits/ [Actions] -requiredWinstVersion >= "4.11.2.6" +requiredWinstVersion >= "4.11.4.6" +ScriptErrorMessages=off DefVar $MsiIdOld$ -DefVar $UninstallProgram$ DefVar $UninstallProgramOld$ DefVar $IniFile$ DefVar $IniCfgFile$ @@ -21,7 +21,7 @@ DefVar $OLD_VERSION$ DefVar $OLD_CREATOR_TAG$ DefVar $OLD_RELEASE$ -Set $LogDir$ = "%SystemDrive%\tmp" +Set $LogDir$ = "%opsiLogDir%" ; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh ; and adds the following variables: @@ -48,9 +48,9 @@ ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ Message "Uninstalling " + $ProductId$ + " ..." -if FileExists("%ScriptPath%\delsub32.ins") +if FileExists("%ScriptPath%\delsub32.opsiscript") comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub32.ins" + Sub "%ScriptPath%\delsub32.opsiscript" endif if $LicenseRequired$ = "true" diff --git a/sample/All/CLIENT_DATA/uninstall3264.ins b/sample/All/CLIENT_DATA/uninstall3264.opsiscript similarity index 92% rename from sample/All/CLIENT_DATA/uninstall3264.ins rename to sample/All/CLIENT_DATA/uninstall3264.opsiscript index b575698..b6871db 100644 --- a/sample/All/CLIENT_DATA/uninstall3264.ins +++ b/sample/All/CLIENT_DATA/uninstall3264.opsiscript @@ -4,14 +4,13 @@ ; credits: http://www.opsi.org/en/credits/ [Actions] -requiredWinstVersion >= "4.11.2.6" +requiredWinstVersion >= "4.11.4.6" +ScriptErrorMessages=off DefVar $MsiIdOld32$ -DefVar $UninstallProgram32$ DefVar $UninstallProgramOld32$ DefVar $IniFile32$ DefVar $MsiIdOld64$ -DefVar $UninstallProgram64$ DefVar $UninstallProgramOld64$ DefVar $IniFile64$ DefVar $IniCfgFile$ @@ -31,7 +30,8 @@ DefVar $OLD_RELEASE$ Set $INST_SystemType$ = GetSystemType set $INST_architecture$ = GetProductProperty("install_architecture","system specific") -Set $LogDir$ = "%SystemDrive%\tmp" + +Set $LogDir$ = "%opsiLogDir%" ; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh ; and adds the following variables: @@ -59,9 +59,9 @@ ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ Message "Uninstalling " + $ProductId$ + " ..." -if FileExists("%ScriptPath%\delsub3264.ins") +if FileExists("%ScriptPath%\delsub3264.opsiscript") comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub3264.ins" + Sub "%ScriptPath%\delsub3264.opsiscript" endif if $LicenseRequired$ = "true" diff --git a/sample/All/CLIENT_DATA/uninstall64.ins b/sample/All/CLIENT_DATA/uninstall64.opsiscript similarity index 92% rename from sample/All/CLIENT_DATA/uninstall64.ins rename to sample/All/CLIENT_DATA/uninstall64.opsiscript index d81dd62..c140fc2 100644 --- a/sample/All/CLIENT_DATA/uninstall64.ins +++ b/sample/All/CLIENT_DATA/uninstall64.opsiscript @@ -4,10 +4,10 @@ ; credits: http://www.opsi.org/en/credits/ [Actions] -requiredWinstVersion >= "4.11.2.6" +requiredWinstVersion >= "4.11.4.6" +ScriptErrorMessages=off DefVar $MsiIdOld$ -DefVar $UninstallProgram$ DefVar $UninstallProgramOld$ DefVar $IniFile$ DefVar $IniCfgFile$ @@ -21,7 +21,7 @@ DefVar $OLD_VERSION$ DefVar $OLD_CREATOR_TAG$ DefVar $OLD_RELEASE$ -Set $LogDir$ = "%SystemDrive%\tmp" +Set $LogDir$ = "%opsiLogDir%" ; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh ; and adds the following variables: @@ -48,9 +48,9 @@ ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ Message "Uninstalling " + $ProductId$ + " ..." -if FileExists("%ScriptPath%\delsub64.ins") +if FileExists("%ScriptPath%\delsub64.opsiscript") comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub64.ins" + Sub "%ScriptPath%\delsub64.opsiscript" endif if $LicenseRequired$ = "true" diff --git a/sample/All/OPSI/control b/sample/All/OPSI/control index d3f60e3..2b2b7d9 100644 --- a/sample/All/OPSI/control +++ b/sample/All/OPSI/control @@ -1,5 +1,5 @@ [Package] -version: 2 +version: 1 depends: incremental: False @@ -9,17 +9,17 @@ id: opsi-template name: opsi template product description: A template for opsi products advice: -version: 4.0.2 +version: 4.0.6 priority: 0 licenseRequired: False productClasses: -setupScript: setup3264.ins -uninstallScript: uninstall3264.ins +setupScript: setup32.opsiscript +uninstallScript: uninstall32.opsiscript updateScript: alwaysScript: onceScript: customScript: -userLoginScript: +userLoginScript: [ProductProperty] type: unicode @@ -36,4 +36,4 @@ requiredProduct: sereby.aio requiredStatus: installed requirementType: before - +[Changelog] diff --git a/sample/All/builder-product.cfg b/sample/All/builder-product.cfg index 293d1a4..f119795 100644 --- a/sample/All/builder-product.cfg +++ b/sample/All/builder-product.cfg @@ -126,6 +126,7 @@ WINST_VALUE[1]="My content" ######################### # if the packaga just supports X86 OR X86_64 (setupXX.ins delsubXX.ins uninstallXX.ins) then you have to just specify one MsiId +##### Msi ###### OPSI_INI_SECTION[0]="X86" OPSI_INI_OPTION[0]="MsiId" OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" @@ -136,8 +137,23 @@ OPSI_INI_SECTION[0]="X86_64" OPSI_INI_OPTION[0]="MsiId" OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" -# if the package supports X86 AND X86_64 (setup3264.ins delsub3264.ins uninstall3264.ins) then you have to specify 2 MsiId's +##### Installer ############## + +OPSI_INI_SECTION[0]="X86" +OPSI_INI_OPTION[0]="UninstallProg" +OPSI_INI_VALUE[0]="uninstall.exe" + +# OR + +OPSI_INI_SECTION[1]="X86_64" +OPSI_INI_OPTION[1]="UninstallProg" +OPSI_INI_VALUE[1]="uninstall.exe" + + +# if the package supports X86 AND X86_64 (setup3264.ins delsub3264.ins uninstall3264.ins) then you have to specify 2 MsiId's or UninstallProg's + +##### Msi ###### OPSI_INI_SECTION[0]="X86" OPSI_INI_OPTION[0]="MsiId32" OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" @@ -148,3 +164,14 @@ OPSI_INI_SECTION[1]="X86_64" OPSI_INI_OPTION[1]="MsiId64" OPSI_INI_VALUE[1]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" +##### Installer ############## +OPSI_INI_SECTION[0]="X86" +OPSI_INI_OPTION[0]="UninstallProg32" +OPSI_INI_VALUE[0]="uninstall.exe" + +# AND + +OPSI_INI_SECTION[1]="X86_64" +OPSI_INI_OPTION[1]="UninstallProg64" +OPSI_INI_VALUE[1]="uninstall.exe" + diff --git a/sample/builder-product.cfg b/sample/builder-product.cfg deleted file mode 100644 index d816336..0000000 --- a/sample/builder-product.cfg +++ /dev/null @@ -1,36 +0,0 @@ -############################ -# Setup product information -############################ -VENDOR="softmaker.de" -PN="pmviewer" -NAME="PlanMaker Viewer" -DESCRIPTION="PlanMaker Viewer 2010" -VERSION="2010.rev633" -RELEASE="10" -PRIORITY="0" -ADVICE="" - -TYPE="restricted" - -##################### -# File object array -##################### - -DL_FILE[0]="SoftMaker-Logo.png" -DL_SOURCE[0]="http://www.android-user.de/var/ezflow_site/storage/images/artikel/exklusiv-vorschau-auf-softmaker-office-fuer-android/softmaker-logo.png/25888-1-ger-DE/SoftMaker-Logo.png.png" - -DL_FILE[1]="PlanMakerViewer2010.msi" -DL_SOURCE[1]="http://internal.graz.disconnected-by-peer.at/Orig/SoftMaker/Viewer/HB/2010/PlanMakerViewer2010.msi" -DL_ARCH[1]="X86" -DL_WINST_NAME[1]="InstallMsi" - -# File array index for the image showing while installing the program -ICON_DL_INDEX=0 - -OPSI_INI_SECTION[0]="X86" -OPSI_INI_OPTION[0]="MsiId" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -OPSI_INI_SECTION[1]="Ignore" -OPSI_INI_OPTION[1]="OEMRegisterSkip" -OPSI_INI_VALUE[1]="-1" diff --git a/sample/control b/sample/control deleted file mode 100644 index 2e70418..0000000 --- a/sample/control +++ /dev/null @@ -1,23 +0,0 @@ -[Package] -version: RELEASE -depends: -incremental: False - -[Product] -type: localboot -id: pmviewer -name: PlanMaker Viewer -description: PlanMaker Viewer 2010 -advice: ADVICE -version: VERSION -priority: PRIORITY -licenseRequired: False -productClasses: -setupScript: setup32.ins -uninstallScript: uninstall32.ins -updateScript: -alwaysScript: -onceScript: -customScript: -userLoginScript: - diff --git a/sample/source/4.0.6/opsi-template-with-admin/CLIENT_DATA/localsetup/Thumbs.db b/sample/source/4.0.6/opsi-template-with-admin/CLIENT_DATA/localsetup/Thumbs.db new file mode 100644 index 0000000000000000000000000000000000000000..513ee4eea4d18d938af21597f3bfbcedbf10ba1e GIT binary patch literal 5120 zcmeI0dpuOz9>CX_8Dk8_J0TN_l*b8qoG>SaP|2gbLMntJdWtbQag;}raFW9jQYjtD zGlw3IJTFq76=w869VQyDnZ57YojSKq_xAa8`rLo+{hZ(4-&t$@*7LW1YpuQaw6{qN z<`l~hfltH?-~ob?f#64a9E@YU6LA0pU<6AeD2o1}1OP_=mj9s{;KQ+E{=*Zz2QH3mlEQP2+)FI0t8j$6X6%b7bb{=WJ4?nj1 z@A%iv0OnI{4NOBPqdn*#5Vx_kwgfmF4s3@PK>NX3fEN(JZYTtJ6NQLG0)Z$@A_)qK z2#bhNgeeqJF-dVzF$pmWMO;=~LP}ajMn;6XKu%U#PEuM%8fyfHhjj=ntp-)?3>+I&InN?BeRSbC-{=-){ea{Ra*nI(#JT=<(>7A7W3Oj60KZ zHZ?8%$8#AMa`W;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DX=jzdN_SwY#=uYM~dnvY$Ve)DgOP_+wi#mKfa!lgMT*C$(U-6}x$U_Up^kXn5B+ z^UqI_Vajt{ovGosJ4348L*m(hl z)`X5)k1@*h4h|JpG$FFcJ4Z$uN3VcIW#nRfWrH!m-k-OgHuVYUqWsHWELaxvbqj!j z#PO3?$>BoMCdLd-^x?R*6o(RQF4r??u|MSM?Isqb!XhAcX2Anz)$xsk$h1U=B!=D> z59R6OlvI9E33mY)N)+yA0f+awY-+i=)6#*_ zS#@wu7u}*c7?{h8E*juQ0AtIl{&qB+Q7C*ko945`1G1*TPY z0cPyb(=Q}bMS&O^8LMsWLePp1eNzFpJ7-zEDry5G+!0_%j?KxZ&tA8=odf4m{?5qTE2<_Jn(%A}hD%v5Y-$`1?xBH@USI#n>z ztpNs*@Vsu8*Iq7fxS#3o9KZwG?YZg8H5ZzrVeSqvsRkG2mE(^))S85&z*N8{fdvU% z2;t1PVkv+{;4nPn;sBFnu&-~B{n;J91P~4I_eqXhh0Azi6QiBMjpCc9rxn0@ok+!T z6u?fpnj{rg%PNcm78{J)Z+`vMQOE8DF#cUC$G!%XHQU#bOP5dpyEJ_E8?OMiuOpW( zp#XMi`0O`c0c>AKE?q(a?9%YrZ@dE7zK&eFgaX*5;j`a(1+aY`xpWByuuH>dzwruS z`#N&z5(;3KhR=TE6~Oj&8*4xTY^)n8aumQ)z-TOl0@zqLQsgLrrGU{`2nDdQZluUj z080U*u@DMiW8FxRqX3oyMq?oqz{a|fB1Zu%1&qc*D1eQ1BSnq^SPB@8g-`$+>qd$k z1+Ww_8VjKSHr9<4Im-j^;riEnJUoIvD15Tuc`4NB8bT}&*sh@)DO#xjmI6j&Ar!#I xx{)GB0W1ZK#zH87jddeMjsjQ;7>$K^ho@bssx%+Fc|34=YoD={6 literal 0 HcmV?d00001 diff --git a/sample/source/4.0.6/opsi-template-with-admin/CLIENT_DATA/localsetup/setup32.opsiscript b/sample/source/4.0.6/opsi-template-with-admin/CLIENT_DATA/localsetup/setup32.opsiscript new file mode 100644 index 0000000..d32cd5c --- /dev/null +++ b/sample/source/4.0.6/opsi-template-with-admin/CLIENT_DATA/localsetup/setup32.opsiscript @@ -0,0 +1,209 @@ +; Copyright (c) uib gmbh (www.uib.de) +; This sourcecode is owned by uib +; and published under the Terms of the General Public License. +; credits: http://www.opsi.org/credits/ + + +[Actions] +requiredWinstVersion >= 4.11.4.12 +setLogLevel=7 +ScriptErrorMessages=off +ExitWindows /Reboot +DefVar $LogDir$ +Set $LogDir$ = "%opsiLogDir%" +DefVar $ProductId$ +DefVar $MinimumSpace$ +DefVar $NewExe$ +DefVar $InstallDir$ +DefVar $ExitCode$ +DefVar $LicenseRequired$ +DefVar $LicenseKey$ +DefVar $LicensePool$ + +; ---------------------------------------------------------------- +; - Please edit the following values - +; ---------------------------------------------------------------- +Set $ProductId$ = "opsi-template" +Set $MinimumSpace$ = "1 MB" +Set $InstallDir$ = "%ProgramFilesDir%\" + $ProductId$ +Set $NewExe$ = $InstallDir$ + "\" + $ProductId$ + ".exe" +Set $LicenseRequired$ = "false" +Set $LicensePool$ = "p_" + $ProductId$ +; ---------------------------------------------------------------- + +if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) + LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ + ExitWindows /Reboot + isFatalError + ; Stop process and set installation status to failed +else + comment " this is for testing only ...remove on real scripts" + if "true" = GetProductProperty("test-set-fatal","true") + isFatalError + endif + + comment "Show product picture" + ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + + if FileExists("%ScriptPath%\delsub.opsiscript") + comment "Start uninstall sub section" + Sub "%ScriptPath%\delsub.opsiscript" + endif + + Message "Installing " + $ProductId$ + " ..." + + if not ($LicenseRequired$ = "false") + comment "Licensing required, reserve license and get license key" + Sub_get_licensekey + endif + + comment "Start setup program" + Winbatch_install + Sub_check_exitcode + + comment "Copy files" + Files_install + + comment "Patch Registry" + Registry_install + + comment "Create shortcuts" + LinkFolder_install +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 ======================================================================================= +; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /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 ======================================================================================== +; "%ScriptPath%\setup.exe" /sp- /silent /norestart + +[Files_install] +; Example of recursively copying some files into the installation directory: +; +; copy -s "%ScriptPath%\files\*.*" "$InstallDir$" + +[Registry_install] +; Example of setting some values of an registry key: +; +; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] +; set "name1" = "some string value" +; set "name2" = REG_DWORD:0001 +; set "name3" = REG_BINARY:00 af 99 cd + +[LinkFolder_install] +; Example of deleting a folder from AllUsers startmenu: +; +; set_basefolder common_programs +; delete_subfolder $ProductId$ +; +; Example of creating an shortcut to the installed exe in AllUsers startmenu: +; +; set_basefolder common_programs +; set_subfolder $ProductId$ +; +; set_link +; name: $ProductId$ +; target: $NewExe$ +; parameters: +; working_dir: $InstallDir$ +; icon_file: +; icon_index: +; end_link +; +; Example of creating an shortcut to the installed exe on AllUsers desktop: +; +; set_basefolder common_desktopdirectory +; set_subfolder "" +; +; set_link +; name: $ProductId$ +; target: $NewExe$ +; parameters: /some_param +; working_dir: $InstallDir$ +; icon_file: $NewExe$ +; 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 + ExitWindows /Reboot + isFatalError + else + if $ServiceErrorClass$ = "LicenseMissingError" + LogError "Fatal: required license is not supplied" + ExitWindows /Reboot + isFatalError + endif + endif + endif +else + LogError "Fatal: license required, but license management not enabled" + ExitWindows /Reboot + isFatalError +endif + + +[Sub_check_exitcode] +comment "Test for installation success via exit code" +set $ExitCode$ = getLastExitCode +; informations to exit codes see +; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx +; http://msdn.microsoft.com/en-us/library/aa368542.aspx +if ($ExitCode$ = "0") + comment "Looks good: setup program gives exitcode zero" +else + comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ + if ($ExitCode$ = "1605") + comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." + comment "Uninstall of a not installed product failed - no problem" + else + if ($ExitCode$ = "1641") + comment "looks good: setup program gives exitcode 1641" + comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." + else + if ($ExitCode$ = "3010") + comment "looks good: setup program gives exitcode 3010" + comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." + else + logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ + ExitWindows /Reboot + isFatalError + endif + endif + endif +endif + diff --git a/sample/source/4.0.6/opsi-template-with-admin/CLIENT_DATA/localsetup/uninstall.opsiscript b/sample/source/4.0.6/opsi-template-with-admin/CLIENT_DATA/localsetup/uninstall.opsiscript new file mode 100644 index 0000000..ce41b48 --- /dev/null +++ b/sample/source/4.0.6/opsi-template-with-admin/CLIENT_DATA/localsetup/uninstall.opsiscript @@ -0,0 +1,66 @@ +; Copyright (c) uib gmbh (www.uib.de) +; This sourcecode is owned by uib gmbh +; and published under the Terms of the General Public License. +; credits: http://www.opsi.org/credits/ + + +[Actions] +requiredWinstVersion >= 4.11.4.12 +setLogLevel=7 +ScriptErrorMessages=off +DefVar $TEMP$ +Set $TEMP$ = "%opsiTmpDir%" +DefVar $LogDir$ +Set $LogDir$ = "%opsiLogDir%" +DefVar $ExitCode$ +DefVar $ProductId$ +DefVar $InstallDir$ +DefVar $LicenseRequired$ +DefVar $LicensePool$ + +; ---------------------------------------------------------------- +; - Please edit the following values - +; ---------------------------------------------------------------- +Set $ProductId$ = "opsi-template" +Set $InstallDir$ = "%ProgramFilesDir%\" + $ProductId$ +Set $LicenseRequired$ = "false" +Set $LicensePool$ = "p_" + $ProductId$ +; ---------------------------------------------------------------- + + +comment "Show product picture" +ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + +Message "Uninstalling " + $ProductId$ + " ..." + +if FileExists("%ScriptPath%\delsub.opsiscript") + comment "Start uninstall sub section" + Sub "%ScriptPath%\delsub.opsiscript" +endif + +if not ($LicenseRequired$ = "false") + 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 + + + diff --git a/sample/source/4.0.6/opsi-template-with-admin/CLIENT_DATA/opsi-template-with-admin.png b/sample/source/4.0.6/opsi-template-with-admin/CLIENT_DATA/opsi-template-with-admin.png new file mode 100644 index 0000000000000000000000000000000000000000..069252241a9e83576c683481f6e95d442c07f814 GIT binary patch literal 77186 zcmeHQ3viXkb(WCO`-R@`w*Y}aJPla#L)d^7j03hOPGXa!xYKq#lfiA%Ce5^Q>Y27q zGt-$QQ(Ai(#(A}|Q^2Wl983%$0T~R!k`M@?_w(v?rF->4Z~FaO>1eh8{dEz#lJ4ER zcf{rF+1+1z&i9|)vu7Xr-oa<~1qZ|jczAdO7e4jmv-tmQ?VsNYe0!g;d>jAyzxvdd z{@TMMFkJiRSyuC%F))3{9=+J);gRZ5_+-KJ-}3ah_*&j~J@4JS zhf?Yzs|K|9LwzLHfC5-za5d2szzSf=H6Xco%7PWZl50S6@stHCfF;*}Ng6~K~fKyvYv1uK9h z*MQ{WDGOErORfRQ#ZwmSo&cBsrTt{*^Y zu2e-ffKAO7{J0VVi`-TRbkU34!udVE_UN~V8=6Mn{I}$-SwMQIwtl>SV5qu|J!NHV zbYN~y;+pvRJ=B#;O9gP{yB`5v2FIo6ULjflXz2BCWqvMCV9J`5s*CP==RM#QT9DuQ z%acavqJa6tX<6aa%O#HmHx^ehPy@18XCFCK_lJFc>8WvvVI*_iA4=-}>K`cSCWJfy z_g=cfFbmGx0V3_uO#*~85_^Zwpe~e=FDXwKJ>1j+c)WrFjeMxViaQKHn7DjE8c8G% zz~14jjD%!->-md}U?x6yVQF&Z0XQ&sJy5}<$R;)zp&8%Zrb!Y3ym3AHXP{Vd{FHz( zCd4#CM}PGNAy@9C1Fji%o>+AG4}aeA({})vZ%UGPSSTSkP+HDt@bgX_Bfc{ej*3Og z<3$6lh-aU+UMRw3iT&vDi$D5jdZyeQsVo>!p*J?4JUu=zh)EF{F8HwB$QKT-`NCdT zfzweIEE~WAek>fVpA!qkoG`hx0N;M~B*F&lZv@P#3}+aR0qQ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?fpnj{rg%PNcm78{J)Z+`vMQOE8DF#cUC$G!%XHQU#bOP5dpyEJ_E8?OMiuOpW( zp#XMi`0O`c0c>AKE?q(a?9%YrZ@dE7zK&eFgaX*5;j`a(1+aY`xpWByuuH>dzwruS z`#N&z5(;3KhR=TE6~Oj&8*4xTY^)n8aumQ)z-TOl0@zqLQsgLrrGU{`2nDdQZluUj z080U*u@DMiW8FxRqX3oyMq?oqz{a|fB1Zu%1&qc*D1eQ1BSnq^SPB@8g-`$+>qd$k z1+Ww_8VjKSHr9<4Im-j^;riEnJUoIvD15Tuc`4NB8bT}&*sh@)DO#xjmI6j&Ar!#I xx{)GB0W1ZK#zH87jddeMjsjQ;7>$K^ho@bssx%+Fc|34=YoD={6 literal 0 HcmV?d00001 diff --git a/sample/source/4.0.6/opsi-template-with-admin/CLIENT_DATA/opsi.bmp b/sample/source/4.0.6/opsi-template-with-admin/CLIENT_DATA/opsi.bmp new file mode 100644 index 0000000000000000000000000000000000000000..dfe62040cec18a7db6b1ca0c088c20129b64d1ca GIT binary patch literal 76854 zcmeI4zpouf6~|v{Ix7AI3Mz_}6tswfhMta!1_2cXLJ>cNL?jThL^3 zvv>XBkKX-(yY}AsyPJRS=im2k{kv=LeOUZ){JrnlyZJ8)_V(WPpB1nIR=^5a0V`ky ztbi4;0#?8ZSOF_w1+0J-umV=V3RnRvU<$`qj_==!>7q z+r!_whw?u>bo`meAA9wM^X1$b?wW5vffr0$pc!s!gPYE9{n;}!BpbK1aK88;fF8W} z^DVoTO6VIn{tPKEneS8k53lO5RUwn<-ybGFq}IdM_wS`p4)^7Dt}Lh`b!WIMlDd|II>yFuN+*V5-lT&R>WP z-zT=`>(2r4a`+N6v-sEyl!IQWLL8Gizxm;J=mvbU8(0JA`6#`^d|4{YXh?(v7mv$_25lC&m>1)NWh2sR*v%*6$RaC)d^=a> zQX6*R9p;;J<`^8smspz7gpC{02SA{FST0!%@KJ|+EVJVxbP0f7zj!%sB~Wa5fqGZ@ z5(zUws0l6x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4CS%n+@|_sq?ftA61F|dq8}7 zWTAsh`>5`4`uDDcV6By>-}44)2G)4cKzt@9LzAI7Hab9Wbl$+dt@IUZMYht#SGw(W zSB7aBcGvxlYr6hQ2-aG8O$}W5W!H*qrHd~d#G0DF5&~DY0#?8ZSOF_w1+0J-umV=V z3RnRvU= 4.12.0.16 +setLogLevel=7 +ScriptErrorMessages=off +DefVar $ProductName$ +DefVar $ProductSizeMB$ +DefVar $LocalSetupScript$ +DefVar $LockKeyboard$ +DefVar $OpsiAdminPass$ +DefVar $RebootFlag$ +DefVar $WinstRegKey$ +DefVar $AutoName$ +DefVar $AutoPass$ +DefVar $AutoDom$ +DefVar $AutoLogon$ +DefVar $AutoBackupKey$ +DefVar $LocalFilesPath$ +DefVar $LocalWinst$ +DefVar $DefaultLoglevel$ +DefVar $PasswdLogLevel$ +DefVar $AdminGroup$ +DefVar $SearchResult$ +DefVar $LocalDomain$ +DefVar $debug$ +DefVar $isFatal$ +DefVar $BackupConsentPromptBehaviorAdmin$ +DefVar $BackupEnableInstallerDetection$ +DefVar $BackupEnableLUA$ +DefVar $BackupEnableVirtualization$ +DefVar $BackupPromptOnSecureDesktop$ +;DefVar $BackupFilterAdministratorToken$ +DefVar $UAC_off$ + +; ---------------------------------------------------------------- +; - Please edit the following values +; ---------------------------------------------------------------- +;Set $ProductName$ = "opsi-template-with-admin" +Set $ProductName$ = "%installingProdName%" +Set $ProductSizeMB$ = "1" +Set $LocalSetupScript$ = "setup32.opsiscript" +set $UAC_off$ = "false" +; ---------------------------------------------------------------- + +comment "get and set initial values..." +set $debug$ = GetProductProperty("debug","false") +set $isFatal$ = "false" +set $DefaultLoglevel$ = "7" +SetLogLevel=$DefaultLoglevel$ +Set $LocalDomain$ = "%PCNAME%" + + +comment "check if we productive or debugging..." +if $debug$ = "true" + comment "we are in debug mode" + Set $LockKeyboard$="false" + Set $PasswdLogLevel$="7" +else + comment "we are in productive mode" + comment "set $LockKeyboard$ to true to prevent user hacks while admin is logged in" + Set $LockKeyboard$="true" + comment " set $PasswdLogLevel$ to 0 for production" + Set $PasswdLogLevel$="0" +endif + +comment "handle Rebootflag" +Set $WinstRegKey$ = "HKLM\SOFTWARE\opsi.org\winst\"+$ProductName$ +Set $RebootFlag$ = GetRegistryValue($WinstRegKey$, "RebootFlag", "32bit") + +comment "some paths required" +Set $AutoBackupKey$ = $WinstRegKey$+"\AutoLogonBackup" +Set $LocalFilesPath$ = "C:\opsi.org\tmp\opsi_local_inst" +Set $LocalWinst$ = "%ProgramFilesDir%\opsi.org\opsi-client-agent\opsi-winst\winst32.exe" +if not( FileExists($LocalWinst$) ) + LogError "No opsi-winst found. Abborting." + isFatalError +endif + +comment "show product picture" +ShowBitmap "%scriptpath%\localsetup\"+$ProductName$+".png" $ProductName$ + +if not (($RebootFlag$ = "1") or ($RebootFlag$ = "2") or ($RebootFlag$ = "3")) + comment "Part before first Reboot" + comment "just reboot - this must be done if this is the first product after OS installation" + comment "handle Rebootflag" + Set $RebootFlag$ = "1" + Registry_SaveRebootFlag /32bit + ;ExitWindows /ImmediateReboot +endif ; Rebootflag = not (1 or 2 or 3) + +if $RebootFlag$ = "1" + comment "Part before second Reboot" + setActionProgress "Preparing" + + if not(HasMinimumSpace ("%SYSTEMDRIVE%", ""+$ProductSizeMB$+" MB")) + LogError "Not enough space on drive C: . "+$ProductSizeMB$+" MB on C: required for "+$ProductName$ + isFatalError + endif + + comment "Lets work..." + Message "Preparing "+$ProductName$+" install step 1..." + sub_Prepare_AutoLogon + + comment "we need to reboot now to be sure that the autologon work" + comment "handle Rebootflag" + Set $RebootFlag$ = "2" + Registry_SaveRebootFlag /32bit + ExitWindows /ImmediateReboot +endif ; Rebootflag = not (1 or 2) + +if ($RebootFlag$ = "2") + comment "Part after first Reboot" + + comment "handle Rebootflag" + Set $RebootFlag$ = "3" + Registry_SaveRebootFlag /32bit + + comment "Lets work..." + Message "Preparing "+$ProductName$+" install step 2..." + Registry_enable_keyboard /sysnative + + comment "now let the autologon work" + comment "it will stop with a reboot" + setActionProgress "Run Installation" + + ExitWindows /ImmediateLogout +endif ; Rebootflag = 2 + +if ($RebootFlag$ = "3") + comment "Part after second Reboot" + ExitWindows /Reboot + setActionProgress "Cleanup" + comment "handle Rebootflag" + Set $RebootFlag$ = "0" + Registry_SaveRebootFlag /32bit + + comment "Lets work..." + Message "Cleanup "+$ProductName$+" install (step 3)..." + sub_Restore_AutoLogon + set $SearchResult$ = GetRegistryValue("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce", "opsi_autologon_setup") + if $SearchResult$ = $LocalWinst$+" "+$LocalFilesPath$+"\"+$LocalSetupScript$+" /batch /productid %installingProdName%" + LogError "Localscript did not run. We remove the RunOnce entry and abort" + Registry_del_runonce /sysnative + set $isFatal$ = "true" + endif + if "true" = GetRegistryValue("HKLM\Software\opsi.org\winst" , "with-admin-fatal", "32bit") + LogError "set to fatal because the local script stored this result" + set $isFatal$ = "true" + endif + comment "cleanup the registry key which stores a fatal result of the local script" + Registry_clean_fatal_flag /32bit + if $isFatal$ = "true" + isFatalError + endif + comment "This is the clean end of the installation" +endif ; Rebootflag = 3 + + +[sub_Prepare_AutoLogon] +comment "copy the setup script and files" +Files_copy_Setup_files_local +comment "read actual Autologon values for backup" +set $AutoName$ = GetRegistryValue("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultUserName") +comment "if AutoLogonName is our setup admin user, something bad happend" +comment "then let us cleanup" +if ($AutoName$="opsiSetupAdmin") + set $AutoName$="" + set $AutoPass$="" + set $AutoDom$="" + set $AutoLogon$="0" +else + set $AutoPass$ = asConfidential(GetRegistryValue("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultPassword")) + set $AutoDom$ = GetRegistryValue("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultDomainName") + set $AutoLogon$ = GetRegistryValue("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "AutoAdminLogon") +endif +if $UAC_off$ = "true" + set $BackupConsentPromptBehaviorAdmin$ = GetRegistryValue("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", "ConsentPromptBehaviorAdmin") + set $BackupEnableInstallerDetection$ = GetRegistryValue("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", "EnableInstallerDetection") + set $BackupEnableLUA$ = GetRegistryValue("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", "EnableLUA") + set $BackupEnableVirtualization$ = GetRegistryValue("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", "EnableVirtualization") + set $BackupPromptOnSecureDesktop$ = GetRegistryValue("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", "PromptOnSecureDesktop") + ;set $BackupFilterAdministratorToken$ = GetRegistryValue("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", "FilterAdministratorToken") + Registry_backup_uac /32bit + Registry_UAC_off /sysnative +endif + +comment "backup AutoLogon values" +Registry_save_autologon /32bit + +comment "prepare the admin AutoLogon" +set $OpsiAdminPass$= asConfidential(randomstr) +Registry_autologon /sysnative + +comment "get the name of the admin group" +set $AdminGroup$ = SidToName("S-1-5-32-544") +comment "create our setup admin user" +DosInAnIcon_makeadmin + +comment "store our setup script as run once" +Registry_runOnce /sysnative + +comment "disable keyboard and mouse while the autologin admin works" +if ($LockKeyboard$="true") + Registry_disable_keyboard /Sysnative +endif + +comment "cleanup the registry key which stores a fatal result of the local script" +Registry_clean_fatal_flag /32bit + +[sub_Restore_AutoLogon] +comment "read AutoLogon values from backup" +set $AutoName$ = GetRegistryValue($AutoBackupKey$, "DefaultUserName", "32bit") +set $AutoPass$ = asConfidential(GetRegistryValue($AutoBackupKey$, "DefaultPassword", "32bit")) +set $AutoDom$ = GetRegistryValue($AutoBackupKey$, "DefaultDomainName", "32bit") +set $AutoLogon$ = GetRegistryValue($AutoBackupKey$, "AutoAdminLogon", "32bit") + +comment "restore the values" +Registry_restore_autologon /Sysnative +comment "delete our setup admin user" +DosInAnIcon_deleteadmin +comment "cleanup setup script, files and profiledir" +Files_delete_Setup_files_local +comment "delete profiledir" +DosInAnIcon_deleteprofile + +if $UAC_off$ = "true" + set $BackupConsentPromptBehaviorAdmin$ = GetRegistryValue($AutoBackupKey$, "ConsentPromptBehaviorAdmin", "32bit") + set $BackupEnableInstallerDetection$ = GetRegistryValue($AutoBackupKey$, "EnableInstallerDetection", "32bit") + set $BackupEnableLUA$ = GetRegistryValue($AutoBackupKey$, "EnableLUA", "32bit") + set $BackupEnableVirtualization$ = GetRegistryValue($AutoBackupKey$, "EnableVirtualization", "32bit") + set $BackupPromptOnSecureDesktop$ = GetRegistryValue($AutoBackupKey$, "PromptOnSecureDesktop", "32bit") + ;set $BackupFilterAdministratorToken$ = GetRegistryValue($AutoBackupKey$, "FilterAdministratorToken") + Registry_UAC_restore /sysnative +endif + + +[Registry_save_autologon] +openkey [$AutoBackupKey$] +set "DefaultUserName"="$AutoName$" +set "DefaultPassword"="$AutoPass$" +set "DefaultDomainName"="$AutoDom$" +set "AutoAdminLogon"="$AutoLogon$" + +[Registry_restore_autologon] +openkey [HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon] +set "DefaultUserName"="$AutoName$" +set "DefaultPassword"="$AutoPass$" +set "DefaultDomainName"="$AutoDom$" +set "AutoAdminLogon"="$AutoLogon$" + +[Registry_backup_uac] +openkey [$AutoBackupKey$] +Set "ConsentPromptBehaviorAdmin" = REG_DWORD:$BackupConsentPromptBehaviorAdmin$ +Set "EnableInstallerDetection" = REG_DWORD:$BackupEnableInstallerDetection$ +Set "EnableLUA" = REG_DWORD:$BackupEnableLUA$ +Set "EnableVirtualization" = REG_DWORD:$BackupEnableVirtualization$ +Set "PromptOnSecureDesktop" = REG_DWORD:$BackupPromptOnSecureDesktop$ +;Set "FilterAdministratorToken" = REG_DWORD:$BackupFilterAdministratorToken$ + + +[DosInAnIcon_deleteadmin] +NET USER opsiSetupAdmin /DELETE + +[Registry_SaveRebootFlag] +openKey [$WinstRegKey$] +set "RebootFlag" = "$RebootFlag$" + +[Files_copy_Setup_files_local] +copy -s "%ScriptPath%\localsetup\*.*" "$LocalFilesPath$" + +[Files_delete_Setup_files_local] +del -sf $LocalFilesPath$\ +; the following command does not wor completely and is therefor commented +; the command is replaced by the section "DosInAnIcon_deleteprofile" (P.Ohler) +;delete -sf "%ProfileDir%\opsiSetupAdmin" + +[DosInAnIcon_deleteprofile] +rmdir /S /Q "%ProfileDir%\opsiSetupAdmin" + +[DosInAnIcon_makeadmin] +NET USER opsiSetupAdmin $OpsiAdminPass$ /ADD +NET LOCALGROUP $AdminGroup$ /ADD opsiSetupAdmin + +[Registry_autologon] +openkey [HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon] +set "DefaultUserName"="opsiSetupAdmin" +set "DefaultPassword"="$OpsiAdminPass$" +set "DefaultDomainName"="$LocalDomain$" +set "AutoAdminLogon"="1" + +[Registry_runonce] +openkey [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce] +set "opsi_autologon_setup"='"$LocalWinst$" "$LocalFilesPath$\$LocalSetupScript$" /batch /productid %installingProdName%' + +[Registry_del_runonce] +openkey [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce] +DeleteVar "opsi_autologon_setup" + +[Registry_disable_keyboard] +openkey [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Kbdclass] +set "Start"=REG_DWORD:0x4 +openkey [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Mouclass] +set "Start"=REG_DWORD:0x4 + +[Registry_enable_keyboard] +openkey [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Kbdclass] +set "Start"=REG_DWORD:0x1 +openkey [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Mouclass] +set "Start"=REG_DWORD:0x1 + +[Registry_clean_fatal_flag] +openkey [$WinstRegKey$] +DeleteVar "with-admin-fatal" + +[Registry_UAC_off] +OpenKey [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System] +Set "ConsentPromptBehaviorAdmin" = REG_DWORD:00000000 +Set "EnableInstallerDetection" = REG_DWORD:00000001 +Set "EnableLUA" = REG_DWORD:00000000 +Set "EnableVirtualization" = REG_DWORD:00000001 +Set "PromptOnSecureDesktop" = REG_DWORD:00000000 +;Set "FilterAdministratorToken" = REG_DWORD:00000000 + + +[Registry_UAC_restore] +OpenKey [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System] +Set "ConsentPromptBehaviorAdmin" = REG_DWORD:$BackupConsentPromptBehaviorAdmin$ +Set "EnableInstallerDetection" = REG_DWORD:$BackupEnableInstallerDetection$ +Set "EnableLUA" = REG_DWORD:$BackupEnableLUA$ +Set "EnableVirtualization" = REG_DWORD:$BackupEnableVirtualization$ +Set "PromptOnSecureDesktop" = REG_DWORD:$BackupPromptOnSecureDesktop$ +;Set "FilterAdministratorToken" = REG_DWORD:$BackupFilterAdministratorToken$ + diff --git a/sample/source/4.0.6/opsi-template-with-admin/OPSI/changelog.txt b/sample/source/4.0.6/opsi-template-with-admin/OPSI/changelog.txt new file mode 100644 index 0000000..60d4709 --- /dev/null +++ b/sample/source/4.0.6/opsi-template-with-admin/OPSI/changelog.txt @@ -0,0 +1,114 @@ +[Changelog] +opsi-template-with-admin (4.1.0.0-2) stable; urgency=low + + * fixed shell shebang in preinst and postisnt + * changelog now in changelog.txt + +-- detlef oertel Tue, 30 Apr 2019 15:00:00 +0000 + +opsi-template-with-admin (4.1.0.0-1) stable; urgency=low + + * allows to temporary disable UAC + * use: asconfidential + * use: GetRegistryValue + * requires opsi-script 4.12.0.16 + +-- detlef oertel Thu, 03 Jan 2019 15:00:00 +0000 + +opsi-template-with-admin (4.0.6-1) stable; urgency=low + + * extended rebootflag ; fixes #1652 + * changed *.ins to *.opsiscript + * ScriptErrorMessages=off + +-- detlef oertel Wed, 02 Sep 2015 15:00:00 +0200 + +opsi-template-with-admin (4.0.5-1) stable; urgency=low + + * + + -- detlef oertel Fri, 24 Oct 2014 15:01:53 +0200 + +opsi-template-with-admin (4.0.3-1) stable; urgency=low + + * removing psgetsid from postinst and preinst + + -- detlef oertel Fri, 12 Apr 2012 15:01:53 +0200 + +opsi-template-with-admin (4.0.2-2) stable; urgency=low + + * requires opsi-winst >= 4.11.3.3 + * uses /productid switch at opsi-winst call + * code cleanup (use of synative instead of 64bit) + * property debug: switches loglevel and lock keyboard + * code cleanup + + -- detlef oertel Thu, 19 Sep 2012 15:01:53 +0200 + +opsi-template-with-admin (4.0.2-1) stable; urgency=low + + * requires opsi-winst >= 4.11.3 + * using SidToName instead of psgetsid.exe + * priority set to -20 + * first reboot is commented (;ExitWindows /ImmediateReboot). Uncomment it if you have problems with the autologon + + -- detlef oertel Wed, 04 Jul 2012 15:01:53 +0200 + +opsi-template-with-admin (1.0-8) stable; urgency=low + + * localdomain = "%PCNAME%" + + -- Jan Schneider Wed, 4 May 2011 14:09:00 +0100 + +opsi-template-with-admin (1.0-7) stable; urgency=low + + * localdomain = "." for nt6 + + -- Jan Schneider Tue, 29 Mar 2011 17:56:00 +0100 + +opsi-template-with-admin (1.0-6) stable; urgency=low + + * postinst fix: /bin/bash + * preinst fix: no more case sensitiv for pcgetsid.exe + + -- detlef oertel Tue, 30 Dec 2010 15:01:53 +0200 + +opsi-template-with-admin (1.0-5) testing; urgency=low + + * added support for opsi 4.0 opsi-client-agent + * scripts renamed to setup.ins, local_setup.ins and uninstall.ins + + -- detlef oertel Tue, 13 Jun 2010 15:01:53 +0200 + +opsi-template-with-admin (1.0-4) testing; urgency=low + + * new (64 bit) functions of winst 4.10.3 used + + -- detlef oertel Fri, 16 Apr 2010 15:01:53 +0200 + +opsi-template-with-admin (1.0-3) testing; urgency=low + + * in [sub_fetch_SearchResult] changed ("$s$") to ('$s$') + + -- detlef oertel Tue, 26 Jan 2010 15:01:53 +0200 + +opsi-template-with-admin (1.0-2) stable; urgency=low + + * added support for 64 Bit + * code cleanup + * added psgetsid for international support + + -- detlef oertel Mon, 14 Dec 2009 15:01:53 +0200 + +opsi-template-with-admin (1.0-1) stable; urgency=low + + * initial package based on http://www.opsi.org/opsi_wiki/TemplateForInstallationsAsTemporaryLocalAdmin + + -- detlef oertel Mon, 13 Nov 2009 15:01:53 +0200 + + + + + + + diff --git a/sample/source/4.0.6/opsi-template-with-admin/OPSI/control b/sample/source/4.0.6/opsi-template-with-admin/OPSI/control new file mode 100644 index 0000000..b54c019 --- /dev/null +++ b/sample/source/4.0.6/opsi-template-with-admin/OPSI/control @@ -0,0 +1,34 @@ +[Package] +version: 2 +depends: + +[Product] +type: localboot +id: opsi-template-with-admin +name: opsi template for installs with logged in admin +description: A opsi demo package +advice: +version: 4.1.0.0 +priority: -20 +licenseRequired: False +productClasses: +setupScript: setup.opsiscript +uninstallScript: localsetup\uninstall.opsiscript +updateScript: +alwaysScript: +onceScript: +customScript: +userLoginScript: + +[ProductProperty] +type: bool +name: debug +description: should be false for production: switch off keyboard lock and increase loglevel +default: False + +[ProductProperty] +type: bool +name: test-set-fatal +description: test only: if true script result is set to fatal +default: False + diff --git a/sample/source/4.0.6/opsi-template-with-admin/OPSI/postinst b/sample/source/4.0.6/opsi-template-with-admin/OPSI/postinst new file mode 100644 index 0000000..5c97506 --- /dev/null +++ b/sample/source/4.0.6/opsi-template-with-admin/OPSI/postinst @@ -0,0 +1,9 @@ +#!/bin/bash +# +# This script executes after unpacking files from that archive and registering the product at the server. +# +# The following environment variables can be used to obtain information about the current installation: +# PRODUCT_ID: id of the current product +# CLIENT_DATA_DIR: directory which contains the installed client data +# + diff --git a/sample/source/4.0.6/opsi-template-with-admin/OPSI/preinst b/sample/source/4.0.6/opsi-template-with-admin/OPSI/preinst new file mode 100644 index 0000000..b1a0d99 --- /dev/null +++ b/sample/source/4.0.6/opsi-template-with-admin/OPSI/preinst @@ -0,0 +1,10 @@ +#!/bin/bash +# +# preinst script for softprod +# This script executes before that package will be unpacked from its archive file. +# +# The following environment variables can be used to obtain information about the current installation: +# PRODUCT_ID: id of the current product +# CLIENT_DATA_DIR: directory where client data will be installed +# + diff --git a/sample/source/4.0.6/opsi-template/CLIENT_DATA/3264/delsub3264.opsiscript b/sample/source/4.0.6/opsi-template/CLIENT_DATA/3264/delsub3264.opsiscript new file mode 100644 index 0000000..e2eb816 --- /dev/null +++ b/sample/source/4.0.6/opsi-template/CLIENT_DATA/3264/delsub3264.opsiscript @@ -0,0 +1,143 @@ +; Copyright (c) uib gmbh (www.uib.de) +; This sourcecode is owned by uib gmbh +; and published under the Terms of the General Public License. +; credits: http://www.opsi.org/en/credits/ + + +Set $MsiId32$ = '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}' +Set $UninstallProgram32$ = $InstallDir32$ + "\uninstall.exe" + +Set $MsiId64$ = '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}' +Set $UninstallProgram64$ = $InstallDir64$ + "\uninstall.exe" + +if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") + Message "Uninstalling " + $ProductId$ + " 32 Bit..." + + if FileExists($UninstallProgram32$) + comment "Uninstall program found, starting uninstall" + Winbatch_uninstall_32 + sub_check_exitcode + endif + + if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId32$ + "] DisplayName") = "") + comment "MSI id " + $MsiId32$ + " found in registry, starting msiexec to uninstall" + Winbatch_uninstall_msi_32 + sub_check_exitcode + endif + + comment "Delete files" + Files_uninstall_32 /32Bit + comment "Cleanup registry" + Registry_uninstall /32Bit +endif + +if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) + Message "Uninstalling " + $ProductId$ + " 64 Bit..." + + if FileExists($UninstallProgram64$) + comment "Uninstall program found, starting uninstall" + Winbatch_uninstall_64 + sub_check_exitcode + endif + + if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId64$ + "] DisplayName") = "") + comment "MSI id " + $MsiId64$ + " found in registry, starting msiexec to uninstall" + Winbatch_uninstall_msi_64 + sub_check_exitcode + endif + + comment "Delete files" + Files_uninstall_64 /64Bit + comment "Cleanup registry" + Registry_uninstall /64Bit +endif + +comment "Delete program shortcuts" +LinkFolder_uninstall + +[Winbatch_uninstall_32] +; Choose one of the following examples as basis for program uninstall +; +; === Nullsoft Scriptable Install System ================================================================ +; maby better Call as +; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 +; "$UninstallProgram32$" /S +; +; === Inno Setup ======================================================================================== +; "$UninstallProgram32$" /silent /norestart /SUPPRESSMSGBOXES /nocancel + + +[Winbatch_uninstall_msi_32] +msiexec /x $MsiId32$ /qb-! REBOOT=ReallySuppress + +[Files_uninstall_32] +; Example for recursively deleting the installation directory (don't forget the trailing backslash): +; +; delete -sf "$InstallDir32$\" + +[Winbatch_uninstall_64] +; Choose one of the following examples as basis for program uninstall +; +; === Nullsoft Scriptable Install System ================================================================ +; maby better Call as +; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 +; "$UninstallProgram64$" /S +; +; === Inno Setup ======================================================================================== +; "$UninstallProgram64$" /silent /norestart /SUPPRESSMSGBOXES /nocancel + + +[Winbatch_uninstall_msi_64] +msiexec /x $MsiId64$ /qb-! REBOOT=ReallySuppress + +[Files_uninstall_64] +; Example for recursively deleting the installation directory: +; +; del -sf "$InstallDir64$\" + +[Registry_uninstall] +; Example of deleting a registry key: +; +; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] + +[LinkFolder_uninstall] +; Example of deleting a folder from AllUsers startmenu: +; +; set_basefolder common_programs +; delete_subfolder $ProductId$ +; +; Example of deleting a shortcut from AllUsers desktop: +; +; set_basefolder common_desktopdirectory +; set_subfolder "" +; delete_element $ProductId$ + +[Sub_check_exitcode] +comment "Test for installation success via exit code" +set $ExitCode$ = getLastExitCode +; informations to exit codes see +; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx +; http://msdn.microsoft.com/en-us/library/aa368542.aspx +if ($ExitCode$ = "0") + comment "Looks good: setup program gives exitcode zero" +else + comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ + if ($ExitCode$ = "1605") + comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." + comment "Uninstall of a not installed product failed - no problem" + else + if ($ExitCode$ = "1641") + comment "looks good: setup program gives exitcode 1641" + comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." + else + if ($ExitCode$ = "3010") + comment "looks good: setup program gives exitcode 3010" + comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." + else + logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ + isFatalError + endif + endif + endif +endif + diff --git a/sample/source/4.0.6/opsi-template/CLIENT_DATA/3264/setup3264.opsiscript b/sample/source/4.0.6/opsi-template/CLIENT_DATA/3264/setup3264.opsiscript new file mode 100644 index 0000000..87ded1e --- /dev/null +++ b/sample/source/4.0.6/opsi-template/CLIENT_DATA/3264/setup3264.opsiscript @@ -0,0 +1,275 @@ +; Copyright (c) uib gmbh (www.uib.de) +; This sourcecode is owned by uib +; and published under the Terms of the General Public License. +; credits: http://www.opsi.org/en/credits/ + +; add the folowing product property to your control file + +;[ProductProperty] +;type: unicode +;name: install_architecture +;multivalue: False +;editable: False +;description: which architecture (32/64 bit) has to be installed +;values: ["32 only", "64 only", "both", "system specific"] +;default: ["system specific"] + + +[Actions] +requiredWinstVersion >= "4.11.4.6" +ScriptErrorMessages=off + +DefVar $MsiId32$ +DefVar $UninstallProgram32$ +DefVar $MsiId64$ +DefVar $UninstallProgram64$ +DefVar $LogDir$ +DefVar $ProductId$ +DefVar $MinimumSpace$ +DefVar $InstallDir32$ +DefVar $InstallDir64$ +DefVar $ExitCode$ +DefVar $LicenseRequired$ +DefVar $LicenseKey$ +DefVar $LicensePool$ +DefVar $INST_SystemType$ +DefVar $INST_architecture$ + +Set $INST_SystemType$ = GetSystemType +set $INST_architecture$ = GetProductProperty("install_architecture","system specific") + + +Set $LogDir$ = "%opsiLogDir%" + +; ---------------------------------------------------------------- +; - Please edit the following values - +; ---------------------------------------------------------------- +;$ProductId$ should be the name of the product in opsi +; therefore please: only lower letters, no umlauts, +; no white space use '-' as a seperator +Set $ProductId$ = "opsi-template" +Set $MinimumSpace$ = "1 MB" +; the path were we find the product after the installation +Set $InstallDir32$ = "%ProgramFiles32Dir%\" +Set $InstallDir64$ = "%ProgramFiles64Dir%\" +Set $LicenseRequired$ = "false" +Set $LicensePool$ = "p_" + $ProductId$ +; ---------------------------------------------------------------- + +if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) + LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ + isFatalError + ; Stop process and set installation status to failed +else + comment "Show product picture" + ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + + if FileExists("%ScriptPath%\delsub3264.opsiscript") + comment "Start uninstall sub section" + Sub "%ScriptPath%\delsub3264.opsiscript" + endif + + if $LicenseRequired$ = "true" + comment "Licensing required, reserve license and get license key" + Sub_get_licensekey + endif + + comment "installing" + + if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") + Message "Installing " + $ProductId$ + " 32 Bit..." + comment "Start setup program" + ChangeDirectory "%SCRIPTPATH%" + Winbatch_install_32 + Sub_check_exitcode + comment "Copy files" + Files_install_32 /32Bit + comment "Patch Registry" + Registry_install /32Bit + comment "Create shortcuts" + LinkFolder_install + endif + + if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) + Message "Installing " + $ProductId$ + " 64 Bit..." + comment "Start setup program" + ChangeDirectory "%SCRIPTPATH%" + Winbatch_install_64 + Sub_check_exitcode + comment "Copy files" + Files_install_64 /64Bit + comment "Patch Registry" + Registry_install /64Bit + comment "Create shortcuts" + LinkFolder_install + endif + +endif + +[Winbatch_install_32] +; 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 "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb-! ALLUSERS=1 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=1 REBOOT=ReallySuppress" +; "%ScriptPath%\setup.exe" /s /v" /qb-! ALLUSERS=1 REBOOT=ReallySuppress" +; +; === InstallShield ===================================================================================== +; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" +; You may use an answer file by the parameter /f1"c:\setup.iss" +; "%ScriptPath%\setup.exe" /s /sms /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 /nocancel /SUPPRESSMSGBOXES + +[Files_install_32] +; Example of recursively copying some files into the installation directory: +; +; copy -s "%ScriptPath%\files\*.*" "$InstallDir32$" + +[Winbatch_install_64] +; 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 "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb-! ALLUSERS=1 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=1 REBOOT=ReallySuppress" +; "%ScriptPath%\setup.exe" /s /v" /qb-! ALLUSERS=1 REBOOT=ReallySuppress" +; +; === InstallShield ===================================================================================== +; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" +; You may use an answer file by the parameter /f1"c:\setup.iss" +; "%ScriptPath%\setup.exe" /s /sms /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 /nocancel /SUPPRESSMSGBOXES + +[Files_install_64] +; Example of recursively copying some files into the installation directory: +; +; copy -s "%ScriptPath%\files\*.*" "$InstallDir64$" + +[Registry_install] +; Example of setting some values of an registry key: +; +; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] +; set "name1" = "some string value" +; set "name2" = REG_DWORD:0001 +; set "name3" = REG_BINARY:00 af 99 cd + +[LinkFolder_install] +; Example of deleting a folder from AllUsers startmenu: +; +; set_basefolder common_programs +; delete_subfolder $ProductId$ +; +; Example of creating an shortcut to the installed exe in AllUsers startmenu: +; +; set_basefolder common_programs +; set_subfolder $ProductId$ +; +; set_link +; name: $ProductId$ +; target: +; parameters: +; working_dir: $InstallDir$ +; icon_file: +; icon_index: +; end_link +; +; Example of creating an shortcut to the installed exe on AllUsers desktop: +; +; set_basefolder common_desktopdirectory +; set_subfolder "" +; +; set_link +; name: $ProductId$ +; target: +; parameters: +; working_dir: $InstallDir$ +; icon_file: +; icon_index: 2 +; end_link + +[Sub_get_licensekey] +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 + +[Sub_check_exitcode] +comment "Test for installation success via exit code" +set $ExitCode$ = getLastExitCode +; informations to exit codes see +; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx +; http://msdn.microsoft.com/en-us/library/aa368542.aspx +if ($ExitCode$ = "0") + comment "Looks good: setup program gives exitcode zero" +else + comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ + if ($ExitCode$ = "1605") + comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." + comment "Uninstall of a not installed product failed - no problem" + else + if ($ExitCode$ = "1641") + comment "looks good: setup program gives exitcode 1641" + comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." + else + if ($ExitCode$ = "3010") + comment "looks good: setup program gives exitcode 3010" + comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." + else + logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ + isFatalError + endif + endif + endif +endif + diff --git a/sample/source/4.0.6/opsi-template/CLIENT_DATA/3264/uninstall3264.opsiscript b/sample/source/4.0.6/opsi-template/CLIENT_DATA/3264/uninstall3264.opsiscript new file mode 100644 index 0000000..d853741 --- /dev/null +++ b/sample/source/4.0.6/opsi-template/CLIENT_DATA/3264/uninstall3264.opsiscript @@ -0,0 +1,70 @@ +; Copyright (c) uib gmbh (www.uib.de) +; This sourcecode is owned by uib gmbh +; and published under the Terms of the General Public License. +; credits: http://www.opsi.org/en/credits/ + +[Actions] +requiredWinstVersion >= "4.11.4.6" +ScriptErrorMessages=off + +DefVar $MsiId32$ +DefVar $UninstallProgram32$ +DefVar $MsiId64$ +DefVar $UninstallProgram64$ +DefVar $LogDir$ +DefVar $ExitCode$ +DefVar $ProductId$ +DefVar $InstallDir32$ +DefVar $InstallDir64$ +DefVar $LicenseRequired$ +DefVar $LicensePool$ +DefVar $INST_SystemType$ +DefVar $INST_architecture$ + +Set $INST_SystemType$ = GetSystemType +set $INST_architecture$ = GetProductProperty("install_architecture","system specific") + + +Set $LogDir$ = "%opsiLogDir%" + +; ---------------------------------------------------------------- +; - Please edit the following values - +; ---------------------------------------------------------------- +Set $ProductId$ = "opsi-template" +Set $InstallDir32$ = "%ProgramFiles32Dir%\" +Set $InstallDir64$ = "%ProgramFiles64Dir%\" +Set $LicenseRequired$ = "false" +Set $LicensePool$ = "p_" + $ProductId$ +; ---------------------------------------------------------------- + + +comment "Show product picture" +ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + +Message "Uninstalling " + $ProductId$ + " ..." + +if FileExists("%ScriptPath%\delsub3264.opsiscript") + comment "Start uninstall sub section" + Sub "%ScriptPath%\delsub3264.opsiscript" +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$) + + diff --git a/sample/source/4.0.6/opsi-template/CLIENT_DATA/32advanced/delsub32.opsiscript b/sample/source/4.0.6/opsi-template/CLIENT_DATA/32advanced/delsub32.opsiscript new file mode 100644 index 0000000..89d3044 --- /dev/null +++ b/sample/source/4.0.6/opsi-template/CLIENT_DATA/32advanced/delsub32.opsiscript @@ -0,0 +1,105 @@ +; Copyright (c) uib gmbh (www.uib.de) +; This sourcecode is owned by uib gmbh +; and published under the Terms of the General Public License. +; credits: http://www.opsi.org/en/credits/ + + +Set $UninstallProgram$ = $InstallDir$ + "\uninstall.exe" + +Message "Uninstalling " + $ProductId$ + " ..." + +if FileExists($UninstallProgram$) + comment "Uninstall program found, starting uninstall" + Winbatch_uninstall + sub_check_exitcode +endif + +set $msilist$ = addtolist($msilist$, '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}') +set $msilist$ = addtolist($msilist$, '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}') +for %aktmsi% in $msilist$ do sub_uninstallmsi + +comment "Delete files" +Files_uninstall /32Bit + +comment "Cleanup registry" +Registry_uninstall /32Bit + +comment "Delete program shortcuts" +LinkFolder_uninstall + +[sub_uninstallmsi] +Set $MsiId$ = "%aktmsi%" +Set $displayName32$ = GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") +Set $displayName64$ = GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") +if not ($displayName32$ = "") or not ($displayName64$ = "") + comment "MSI id " + $MsiId$ + " found in registry, starting msiexec to uninstall" + Winbatch_uninstall_msi + ;Winbatch_uninstall + sub_check_exitcode +endif + +[Winbatch_uninstall] +; Choose one of the following examples as basis for program uninstall +; +; === Nullsoft Scriptable Install System ================================================================ +; maybe better called as +; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 +; "$UninstallProgram$" /S +; +; === Inno Setup ======================================================================================== +; "$UninstallProgram$" /silent /norestart /SUPPRESSMSGBOXES /nocancel + +[Winbatch_uninstall_msi] +msiexec /x $MsiId$ /qb-! REBOOT=ReallySuppress + +[Files_uninstall] +; Example for recursively deleting the installation directory: +; +; del -sf "$InstallDir$\" + +[Registry_uninstall] +; Example of deleting a registry key: +; +; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] + +[LinkFolder_uninstall] +; Example of deleting a folder from AllUsers startmenu: +; +; set_basefolder common_programs +; delete_subfolder $ProductId$ +; +; Example of deleting a shortcut from AllUsers desktop: +; +; set_basefolder common_desktopdirectory +; set_subfolder "" +; delete_element $ProductId$ + +[Sub_check_exitcode] +comment "Test for installation success via exit code" +set $ExitCode$ = getLastExitCode +; informations to exit codes see +; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx +; http://msdn.microsoft.com/en-us/library/aa368542.aspx +if ($ExitCode$ = "0") + comment "Looks good: setup program gives exitcode zero" +else + comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ + if ($ExitCode$ = "1605") + comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." + comment "Uninstall of a not installed product failed - no problem" + else + if ($ExitCode$ = "1641") + comment "looks good: setup program gives exitcode 1641" + comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." + else + if ($ExitCode$ = "3010") + comment "looks good: setup program gives exitcode 3010" + comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." + else + logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ + isFatalError + endif + endif + endif +endif + diff --git a/sample/source/4.0.6/opsi-template/CLIENT_DATA/32advanced/setup32.opsiscript b/sample/source/4.0.6/opsi-template/CLIENT_DATA/32advanced/setup32.opsiscript new file mode 100644 index 0000000..88d5fe8 --- /dev/null +++ b/sample/source/4.0.6/opsi-template/CLIENT_DATA/32advanced/setup32.opsiscript @@ -0,0 +1,217 @@ +; Copyright (c) uib gmbh (www.uib.de) +; This sourcecode is owned by uib +; and published under the Terms of the General Public License. +; credits: http://www.opsi.org/en/credits/ + +[Actions] +requiredWinstVersion >= "4.11.4.6" +ScriptErrorMessages=off + +DefVar $MsiId$ +DefVar $UninstallProgram$ +DefVar $LogDir$ +DefVar $ProductId$ +DefVar $MinimumSpace$ +DefVar $InstallDir$ +DefVar $ExitCode$ +DefVar $LicenseRequired$ +DefVar $LicenseKey$ +DefVar $LicensePool$ +DefVar $displayName32$ +DefVar $displayName64$ + +DefStringlist $msilist$ + +Set $LogDir$ = "%opsiLogDir%" + +; ---------------------------------------------------------------- +; - Please edit the following values - +; ---------------------------------------------------------------- +;$ProductId$ should be the name of the product in opsi +; therefore please: only lower letters, no umlauts, +; no white space use '-' as a seperator +Set $ProductId$ = "opsi-template" +Set $MinimumSpace$ = "1 MB" +; the path were we find the product after the installation +Set $InstallDir$ = "%ProgramFiles32Dir%\" +Set $LicenseRequired$ = "false" +Set $LicensePool$ = "p_" + $ProductId$ +; ---------------------------------------------------------------- + +if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) + LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ + isFatalError "No Space" + ; Stop process and set installation status to failed +else + comment "Show product picture" + ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + + if FileExists("%ScriptPath%\delsub32.opsiscript") + comment "Start uninstall sub section" + Sub "%ScriptPath%\delsub32.opsiscript" + endif + + Message "Installing " + $ProductId$ + " ..." + + if $LicenseRequired$ = "true" + comment "Licensing required, reserve license and get license key" + Sub_get_licensekey + endif + + comment "Start setup program" + ChangeDirectory "%SCRIPTPATH%" + Winbatch_install + Sub_check_exitcode + + comment "Copy files" + Files_install /32Bit + + comment "Patch Registry" + Registry_install /32Bit + + comment "Create shortcuts" + LinkFolder_install + +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 "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb-! ALLUSERS=1 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=1 REBOOT=ReallySuppress" +; "%ScriptPath%\setup.exe" /s /v" /qb-! ALLUSERS=1 REBOOT=ReallySuppress" +; +; === InstallShield ===================================================================================== +; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" +; You may use an answer file by the parameter /f1"c:\setup.iss" +; "%ScriptPath%\setup.exe" /s /sms /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 /nocancel /SUPPRESSMSGBOXES + +[Files_install] +; Example of recursively copying some files into the installation directory: +; +; copy -s "%ScriptPath%\files\*.*" "$InstallDir$" + +[Registry_install] +; Example of setting some values of an registry key: +; +; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] +; set "name1" = "some string value" +; set "name2" = REG_DWORD:0001 +; set "name3" = REG_BINARY:00 af 99 cd + +[LinkFolder_install] +; Example of deleting a folder from AllUsers startmenu: +; +; set_basefolder common_programs +; delete_subfolder $ProductId$ +; +; Example of creating an shortcut to the installed exe in AllUsers startmenu: +; +; set_basefolder common_programs +; set_subfolder $ProductId$ +; +; set_link +; name: $ProductId$ +; target: +; parameters: +; working_dir: $InstallDir$ +; icon_file: +; icon_index: +; end_link +; +; Example of creating an shortcut to the installed exe on AllUsers desktop: +; +; set_basefolder common_desktopdirectory +; set_subfolder "" +; +; set_link +; name: $ProductId$ +; target: +; parameters: +; working_dir: $InstallDir$ +; icon_file: +; 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 +; informations to exit codes see +; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx +; http://msdn.microsoft.com/en-us/library/aa368542.aspx +if ($ExitCode$ = "0") + comment "Looks good: setup program gives exitcode zero" +else + comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ + if ($ExitCode$ = "1605") + comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." + comment "Uninstall of a not installed product failed - no problem" + else + if ($ExitCode$ = "1641") + comment "looks good: setup program gives exitcode 1641" + comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." + else + if ($ExitCode$ = "3010") + comment "looks good: setup program gives exitcode 3010" + comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." + else + logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ + isFatalError + endif + endif + endif +endif + diff --git a/sample/source/4.0.6/opsi-template/CLIENT_DATA/32advanced/uninstall32.opsiscript b/sample/source/4.0.6/opsi-template/CLIENT_DATA/32advanced/uninstall32.opsiscript new file mode 100644 index 0000000..435b036 --- /dev/null +++ b/sample/source/4.0.6/opsi-template/CLIENT_DATA/32advanced/uninstall32.opsiscript @@ -0,0 +1,63 @@ +; Copyright (c) uib gmbh (www.uib.de) +; This sourcecode is owned by uib gmbh +; and published under the Terms of the General Public License. +; credits: http://www.opsi.org/en/credits/ + +[Actions] +requiredWinstVersion >= "4.11.4.6" +ScriptErrorMessages=off + +DefVar $MsiId$ +DefVar $UninstallProgram$ +DefVar $LogDir$ +DefVar $ExitCode$ +DefVar $ProductId$ +DefVar $InstallDir$ +DefVar $LicenseRequired$ +DefVar $LicensePool$ +DefVar $displayName32$ +DefVar $displayName64$ + +DefStringlist $msilist$ + +Set $LogDir$ = "%opsiLogDir%" + +; ---------------------------------------------------------------- +; - Please edit the following values - +; ---------------------------------------------------------------- +Set $ProductId$ = "opsi-template" +Set $InstallDir$ = "%ProgramFiles32Dir%\" +Set $LicenseRequired$ = "false" +Set $LicensePool$ = "p_" + $ProductId$ +; ---------------------------------------------------------------- + + +comment "Show product picture" +ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + +Message "Uninstalling " + $ProductId$ + " ..." + +if FileExists("%ScriptPath%\delsub32.opsiscript") + comment "Start uninstall sub section" + Sub "%ScriptPath%\delsub32.opsiscript" +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$) + diff --git a/sample/source/4.0.6/opsi-template/CLIENT_DATA/64/delsub64.opsiscript b/sample/source/4.0.6/opsi-template/CLIENT_DATA/64/delsub64.opsiscript new file mode 100644 index 0000000..96fe68c --- /dev/null +++ b/sample/source/4.0.6/opsi-template/CLIENT_DATA/64/delsub64.opsiscript @@ -0,0 +1,97 @@ +; Copyright (c) uib gmbh (www.uib.de) +; This sourcecode is owned by uib gmbh +; and published under the Terms of the General Public License. +; credits: http://www.opsi.org/en/credits/ + + +Set $MsiId$ = '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}' +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 (GetRegistryStringValue64("[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 /64Bit + +comment "Cleanup registry" +Registry_uninstall /64Bit + +comment "Delete program shortcuts" +LinkFolder_uninstall + +[Winbatch_uninstall] +; Choose one of the following examples as basis for program uninstall +; +; === Nullsoft Scriptable Install System ================================================================ +; maby better Call as +; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 +; "$UninstallProgram$" /S +; +; === Inno Setup ======================================================================================== +; "$UninstallProgram$" /silent /norestart /SUPPRESSMSGBOXES /nocancel + + +[Winbatch_uninstall_msi] +msiexec /x $MsiId$ /qb-! REBOOT=ReallySuppress + +[Files_uninstall] +; Example for recursively deleting the installation directory: +; +; del -sf "$InstallDir$\" + +[Registry_uninstall] +; Example of deleting a registry key: +; +; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] + +[LinkFolder_uninstall] +; Example of deleting a folder from AllUsers startmenu: +; +; set_basefolder common_programs +; delete_subfolder $ProductId$ +; +; Example of deleting a shortcut from AllUsers desktop: +; +; set_basefolder common_desktopdirectory +; set_subfolder "" +; delete_element $ProductId$ + +[Sub_check_exitcode] +comment "Test for installation success via exit code" +set $ExitCode$ = getLastExitCode +; informations to exit codes see +; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx +; http://msdn.microsoft.com/en-us/library/aa368542.aspx +if ($ExitCode$ = "0") + comment "Looks good: setup program gives exitcode zero" +else + comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ + if ($ExitCode$ = "1605") + comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." + comment "Uninstall of a not installed product failed - no problem" + else + if ($ExitCode$ = "1641") + comment "looks good: setup program gives exitcode 1641" + comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." + else + if ($ExitCode$ = "3010") + comment "looks good: setup program gives exitcode 3010" + comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." + else + logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ + isFatalError + endif + endif + endif +endif + diff --git a/sample/source/4.0.6/opsi-template/CLIENT_DATA/64/setup64.opsiscript b/sample/source/4.0.6/opsi-template/CLIENT_DATA/64/setup64.opsiscript new file mode 100644 index 0000000..aed1f20 --- /dev/null +++ b/sample/source/4.0.6/opsi-template/CLIENT_DATA/64/setup64.opsiscript @@ -0,0 +1,213 @@ +; Copyright (c) uib gmbh (www.uib.de) +; This sourcecode is owned by uib +; and published under the Terms of the General Public License. +; credits: http://www.opsi.org/en/credits/ + +[Actions] +requiredWinstVersion >= "4.11.4.6" +ScriptErrorMessages=off + +DefVar $MsiId$ +DefVar $UninstallProgram$ +DefVar $LogDir$ +DefVar $ProductId$ +DefVar $MinimumSpace$ +DefVar $InstallDir$ +DefVar $ExitCode$ +DefVar $LicenseRequired$ +DefVar $LicenseKey$ +DefVar $LicensePool$ + +Set $LogDir$ = "%opsiLogDir%" + +; ---------------------------------------------------------------- +; - Please edit the following values - +; ---------------------------------------------------------------- +;$ProductId$ should be the name of the product in opsi +; therefore please: only lower letters, no umlauts, +; no white space use '-' as a seperator +Set $ProductId$ = "opsi-template" +Set $MinimumSpace$ = "1 MB" +; the path were we find the product after the installation +Set $InstallDir$ = "%ProgramFiles64Dir%\" +Set $LicenseRequired$ = "false" +Set $LicensePool$ = "p_" + $ProductId$ +; ---------------------------------------------------------------- + +if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) + LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ + isFatalError + ; Stop process and set installation status to failed +else + comment "Show product picture" + ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + + if FileExists("%ScriptPath%\delsub64.opsiscript") + comment "Start uninstall sub section" + Sub "%ScriptPath%\delsub64.opsiscript" + endif + + Message "Installing " + $ProductId$ + " ..." + + if $LicenseRequired$ = "true" + comment "Licensing required, reserve license and get license key" + Sub_get_licensekey + endif + + comment "Start setup program" + ChangeDirectory "%SCRIPTPATH%" + Winbatch_install + Sub_check_exitcode + + comment "Copy files" + Files_install /64Bit + + comment "Patch Registry" + Registry_install /64Bit + + comment "Create shortcuts" + LinkFolder_install + +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 "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb-! ALLUSERS=1 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=1 REBOOT=ReallySuppress" +; "%ScriptPath%\setup.exe" /s /v" /qb-! ALLUSERS=1 REBOOT=ReallySuppress" +; +; === InstallShield ===================================================================================== +; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" +; You may use an answer file by the parameter /f1"c:\setup.iss" +; "%ScriptPath%\setup.exe" /s /sms /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 /nocancel /SUPPRESSMSGBOXES + +[Files_install] +; Example of recursively copying some files into the installation directory: +; +; copy -s "%ScriptPath%\files\*.*" "$InstallDir$" + +[Registry_install] +; Example of setting some values of an registry key: +; +; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] +; set "name1" = "some string value" +; set "name2" = REG_DWORD:0001 +; set "name3" = REG_BINARY:00 af 99 cd + +[LinkFolder_install] +; Example of deleting a folder from AllUsers startmenu: +; +; set_basefolder common_programs +; delete_subfolder $ProductId$ +; +; Example of creating an shortcut to the installed exe in AllUsers startmenu: +; +; set_basefolder common_programs +; set_subfolder $ProductId$ +; +; set_link +; name: $ProductId$ +; target: +; parameters: +; working_dir: $InstallDir$ +; icon_file: +; icon_index: +; end_link +; +; Example of creating an shortcut to the installed exe on AllUsers desktop: +; +; set_basefolder common_desktopdirectory +; set_subfolder "" +; +; set_link +; name: $ProductId$ +; target: +; parameters: +; working_dir: $InstallDir$ +; icon_file: +; 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 +; informations to exit codes see +; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx +; http://msdn.microsoft.com/en-us/library/aa368542.aspx +if ($ExitCode$ = "0") + comment "Looks good: setup program gives exitcode zero" +else + comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ + if ($ExitCode$ = "1605") + comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." + comment "Uninstall of a not installed product failed - no problem" + else + if ($ExitCode$ = "1641") + comment "looks good: setup program gives exitcode 1641" + comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." + else + if ($ExitCode$ = "3010") + comment "looks good: setup program gives exitcode 3010" + comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." + else + logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ + isFatalError + endif + endif + endif +endif + diff --git a/sample/source/4.0.6/opsi-template/CLIENT_DATA/64/uninstall64.opsiscript b/sample/source/4.0.6/opsi-template/CLIENT_DATA/64/uninstall64.opsiscript new file mode 100644 index 0000000..f5eab36 --- /dev/null +++ b/sample/source/4.0.6/opsi-template/CLIENT_DATA/64/uninstall64.opsiscript @@ -0,0 +1,60 @@ +; Copyright (c) uib gmbh (www.uib.de) +; This sourcecode is owned by uib gmbh +; and published under the Terms of the General Public License. +; credits: http://www.opsi.org/en/credits/ + +[Actions] +requiredWinstVersion >= "4.11.4.6" +ScriptErrorMessages=off + +DefVar $MsiId$ +DefVar $UninstallProgram$ +DefVar $LogDir$ +DefVar $ExitCode$ +DefVar $ProductId$ +DefVar $InstallDir$ +DefVar $LicenseRequired$ +DefVar $LicensePool$ + +Set $LogDir$ = "%opsiLogDir%" + +; ---------------------------------------------------------------- +; - Please edit the following values - +; ---------------------------------------------------------------- +Set $ProductId$ = "opsi-template" +Set $InstallDir$ = "%ProgramFiles64Dir%\" +Set $LicenseRequired$ = "false" +Set $LicensePool$ = "p_" + $ProductId$ +; ---------------------------------------------------------------- + + +comment "Show product picture" +ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + +Message "Uninstalling " + $ProductId$ + " ..." + +if FileExists("%ScriptPath%\delsub64.opsiscript") + comment "Start uninstall sub section" + Sub "%ScriptPath%\delsub64.opsiscript" +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$) + + diff --git a/sample/source/4.0.6/opsi-template/CLIENT_DATA/delsub32.opsiscript b/sample/source/4.0.6/opsi-template/CLIENT_DATA/delsub32.opsiscript new file mode 100644 index 0000000..570f87d --- /dev/null +++ b/sample/source/4.0.6/opsi-template/CLIENT_DATA/delsub32.opsiscript @@ -0,0 +1,95 @@ +; Copyright (c) uib gmbh (www.uib.de) +; This sourcecode is owned by uib gmbh +; and published under the Terms of the General Public License. +; credits: http://www.opsi.org/en/credits/ + +Set $MsiId$ = '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}' +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 + sub_check_exitcode +endif + +comment "Delete files" +Files_uninstall /32Bit + +comment "Cleanup registry" +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 ================================================================ +; maybe better called as +; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 +; "$UninstallProgram$" /S +; +; === Inno Setup ======================================================================================== +; "$UninstallProgram$" /silent /norestart /SUPPRESSMSGBOXES /nocancel + +[Winbatch_uninstall_msi] +msiexec /x $MsiId$ /qb-! REBOOT=ReallySuppress + +[Files_uninstall] +; Example for recursively deleting the installation directory: +; +; del -sf "$InstallDir$\" + +[Registry_uninstall] +; Example of deleting a registry key: +; +; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] + +[LinkFolder_uninstall] +; Example of deleting a folder from AllUsers startmenu: +; +; set_basefolder common_programs +; delete_subfolder $ProductId$ +; +; Example of deleting a shortcut from AllUsers desktop: +; +; set_basefolder common_desktopdirectory +; set_subfolder "" +; delete_element $ProductId$ + +[Sub_check_exitcode] +comment "Test for installation success via exit code" +set $ExitCode$ = getLastExitCode +; informations to exit codes see +; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx +; http://msdn.microsoft.com/en-us/library/aa368542.aspx +if ($ExitCode$ = "0") + comment "Looks good: setup program gives exitcode zero" +else + comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ + if ($ExitCode$ = "1605") + comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." + comment "Uninstall of a not installed product failed - no problem" + else + if ($ExitCode$ = "1641") + comment "looks good: setup program gives exitcode 1641" + comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." + else + if ($ExitCode$ = "3010") + comment "looks good: setup program gives exitcode 3010" + comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." + else + logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ + isFatalError + endif + endif + endif +endif + diff --git a/sample/source/4.0.6/opsi-template/CLIENT_DATA/login.opsiscript b/sample/source/4.0.6/opsi-template/CLIENT_DATA/login.opsiscript new file mode 100644 index 0000000..60419d9 --- /dev/null +++ b/sample/source/4.0.6/opsi-template/CLIENT_DATA/login.opsiscript @@ -0,0 +1,24 @@ +; Copyright (c) uib gmbh (www.uib.de) +; This sourcecode is owned by uib gmbh +; and published under the Terms of the General Public License. +; credits: http://www.opsi.org/en/credits/ + +[Actions] +Message "Profile Patch for VLC ...." + +comment "Did we run this script before ? - and set version stamp in profile" +if getValue("installationstate", getProductMap) = "installed" + comment "Product is installed" + if not (scriptWasExecutedBefore) + comment "loginscript was not run yet " + Files_profile_copy + Registry_currentuser_set + endif +endif + +[Files_profile_copy] +copy "%Scriptpath%\profiles\*.*" "%CurrentAppdataDir%\ACME" + +[Registry_currentuser_set] +openkey [HKCU\Software\ACME] +set "show_greeting_window" = "no" diff --git a/sample/source/4.0.6/opsi-template/CLIENT_DATA/opsi-template.png b/sample/source/4.0.6/opsi-template/CLIENT_DATA/opsi-template.png new file mode 100644 index 0000000000000000000000000000000000000000..e4b974e698524663cb4a7e068a728d5f6f5e30c8 GIT binary patch literal 16993 zcmV*ZKvutrP)006281^@s6DpW*E00001b5ch_0Itp) z=>Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L00*=H00*=ID}MxV00007bV*G`2iO7} z3J?#4Tm`cL03ZNKL_t(|+Uhh|1+ z&fI%vB+G?J_w%`*8I5Lc`Q7jN^#aUnGuzBIvrX5H%#h%c(UZ-PX9j>*3Jqt#I0L|o zLNhW+;ISEE&TJE<)rHcI%>Z!*fKvfHG6@}!P2hhs0Gt7zE%1oN`$AlgS-hXNAe;f< z#K0#4j@W?F34F}rZ#G>)I0L|mfv=d|imoEi%=DglKW#xc1Hj_JM+Kl!o6kiMGK<~h zUQOY%X$3-g25$v{m<8GQf~!6ugS@-VjDPgWMA!NI+;wXMM7~ZXv>AXGfSUkr6X;7Z z^LVeBeEkd2<8KOFj{z_^4w(5L<^E4*MDPsga=`bkz>2&4RDRrKto583e`q%K{6HdP zL7@Zc%sjeJANlmZ#afSYAk@>Z1_wsdK^(tj!8pSK3j>k>ARZ!p8~{==SjQ}uc zYOj87^yn4<-v=P2L6doeQdE)6pDo5{iS!p-aozb9Zy&!&0@dd<}ExEN+e`u}SBHS=3Z03AJ&Mp`V z0B%C-G9R8aqN5z>WE%jI5Rn@)zv(g)UFq){7U1K>vMDS8HUq%v2fREhSO<$_+$DRo z;kW=e{(TmNULwuS9PFqb>B@+3&e)LB*07b>oi;|uj1E`?IL{c-V;OqQle}&l(VGKA zH<9WAz+^17QyUtz_>G+tds?~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6/opsi-template/CLIENT_DATA/setup32.opsiscript b/sample/source/4.0.6/opsi-template/CLIENT_DATA/setup32.opsiscript new file mode 100644 index 0000000..53474cd --- /dev/null +++ b/sample/source/4.0.6/opsi-template/CLIENT_DATA/setup32.opsiscript @@ -0,0 +1,226 @@ +; Copyright (c) uib gmbh (www.uib.de) +; This sourcecode is owned by uib +; and published under the Terms of the General Public License. +; credits: http://www.opsi.org/en/credits/ + +[Actions] +requiredWinstVersion >= "4.11.4.6" +ScriptErrorMessages=off + +DefVar $MsiId$ +DefVar $UninstallProgram$ +DefVar $LogDir$ +DefVar $ProductId$ +DefVar $MinimumSpace$ +DefVar $InstallDir$ +DefVar $ExitCode$ +DefVar $LicenseRequired$ +DefVar $LicenseKey$ +DefVar $LicensePool$ +DefVar $myProperty$ + +Set $LogDir$ = "%opsiLogDir%" + +; ---------------------------------------------------------------- +; - Please edit the following values - +; ---------------------------------------------------------------- +;$ProductId$ should be the name of the product in opsi +; therefore please: only lower letters, no umlauts, +; no white space use '-' as a seperator +Set $ProductId$ = "opsi-template" +Set $MinimumSpace$ = "1 MB" +; the path were we find the product after the installation +Set $InstallDir$ = "%ProgramFiles32Dir%\" +Set $LicenseRequired$ = "false" +Set $LicensePool$ = "p_" + $ProductId$ +; ---------------------------------------------------------------- + +if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) + LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ + isFatalError "No Space" + ; Stop process and set installation status to failed +else + comment "Show product picture" + ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + + comment "get property value ....." + set $myProperty$ = getProductProperty("dummy_prop", "yes") + if $myProperty$ = "yes" + comment "myproperty value is yes" + else + if $myProperty$ = "no" + comment "myproperty value is no" + else + comment "myproperty value must be may_be" + endif + endif + + if FileExists("%ScriptPath%\delsub32.opsiscript") + comment "Start uninstall sub section" + Sub "%ScriptPath%\delsub32.opsiscript" + endif + + Message "Installing " + $ProductId$ + " ..." + + if $LicenseRequired$ = "true" + comment "Licensing required, reserve license and get license key" + Sub_get_licensekey + endif + + comment "Start setup program" + ChangeDirectory "%SCRIPTPATH%" + Winbatch_install + Sub_check_exitcode + + comment "Copy files" + Files_install /32Bit + + comment "Patch Registry" + Registry_install /32Bit + + comment "Create shortcuts" + LinkFolder_install + +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 "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb-! ALLUSERS=1 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=1 REBOOT=ReallySuppress" +; "%ScriptPath%\setup.exe" /s /v" /qb-! ALLUSERS=1 REBOOT=ReallySuppress" +; +; === InstallShield ===================================================================================== +; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" +; You may use an answer file by the parameter /f1"c:\setup.iss" +; "%ScriptPath%\setup.exe" /s /sms /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 /nocancel /SUPPRESSMSGBOXES + +[Files_install] +; Example of recursively copying some files into the installation directory: +; +; copy -s "%ScriptPath%\files\*.*" "$InstallDir$" + +[Registry_install] +; Example of setting some values of an registry key: +; +; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] +; set "name1" = "some string value" +; set "name2" = REG_DWORD:0001 +; set "name3" = REG_BINARY:00 af 99 cd + +[LinkFolder_install] +; Example of deleting a folder from AllUsers startmenu: +; +; set_basefolder common_programs +; delete_subfolder $ProductId$ +; +; Example of creating an shortcut to the installed exe in AllUsers startmenu: +; +; set_basefolder common_programs +; set_subfolder $ProductId$ +; +; set_link +; name: $ProductId$ +; target: +; parameters: +; working_dir: $InstallDir$ +; icon_file: +; icon_index: +; end_link +; +; Example of creating an shortcut to the installed exe on AllUsers desktop: +; +; set_basefolder common_desktopdirectory +; set_subfolder "" +; +; set_link +; name: $ProductId$ +; target: +; parameters: +; working_dir: $InstallDir$ +; icon_file: +; 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 +; informations to exit codes see +; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx +; http://msdn.microsoft.com/en-us/library/aa368542.aspx +if ($ExitCode$ = "0") + comment "Looks good: setup program gives exitcode zero" +else + comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ + if ($ExitCode$ = "1605") + comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." + comment "Uninstall of a not installed product failed - no problem" + else + if ($ExitCode$ = "1641") + comment "looks good: setup program gives exitcode 1641" + comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." + else + if ($ExitCode$ = "3010") + comment "looks good: setup program gives exitcode 3010" + comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." + else + logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ + isFatalError + endif + endif + endif +endif + diff --git a/sample/source/4.0.6/opsi-template/CLIENT_DATA/uninstall32.opsiscript b/sample/source/4.0.6/opsi-template/CLIENT_DATA/uninstall32.opsiscript new file mode 100644 index 0000000..dce5d02 --- /dev/null +++ b/sample/source/4.0.6/opsi-template/CLIENT_DATA/uninstall32.opsiscript @@ -0,0 +1,59 @@ +; Copyright (c) uib gmbh (www.uib.de) +; This sourcecode is owned by uib gmbh +; and published under the Terms of the General Public License. +; credits: http://www.opsi.org/en/credits/ + +[Actions] +requiredWinstVersion >= "4.11.4.6" +ScriptErrorMessages=off + +DefVar $MsiId$ +DefVar $UninstallProgram$ +DefVar $LogDir$ +DefVar $ExitCode$ +DefVar $ProductId$ +DefVar $InstallDir$ +DefVar $LicenseRequired$ +DefVar $LicensePool$ + +Set $LogDir$ = "%opsiLogDir%" + +; ---------------------------------------------------------------- +; - Please edit the following values - +; ---------------------------------------------------------------- +Set $ProductId$ = "opsi-template" +Set $InstallDir$ = "%ProgramFiles32Dir%\" +Set $LicenseRequired$ = "false" +Set $LicensePool$ = "p_" + $ProductId$ +; ---------------------------------------------------------------- + + +comment "Show product picture" +ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + +Message "Uninstalling " + $ProductId$ + " ..." + +if FileExists("%ScriptPath%\delsub32.opsiscript") + comment "Start uninstall sub section" + Sub "%ScriptPath%\delsub32.opsiscript" +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$) + diff --git a/sample/source/4.0.6/opsi-template/CLIENT_DATA/use_include/delsub_short32.opsiscript b/sample/source/4.0.6/opsi-template/CLIENT_DATA/use_include/delsub_short32.opsiscript new file mode 100644 index 0000000..b4798c8 --- /dev/null +++ b/sample/source/4.0.6/opsi-template/CLIENT_DATA/use_include/delsub_short32.opsiscript @@ -0,0 +1,67 @@ +; Copyright (c) uib gmbh (www.uib.de) +; This sourcecode is owned by uib gmbh +; and published under the Terms of the General Public License. +; credits: http://www.opsi.org/en/credits/ + +include_append "section_sub_check_exitcode.opsiinc" + +Set $MsiId$ = '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}' +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 + sub_check_exitcode +endif + +comment "Delete files" +Files_uninstall /32Bit + +comment "Cleanup registry" +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 /nocancel + + +[Winbatch_uninstall_msi] +msiexec /x $MsiId$ /qb-! REBOOT=ReallySuppress + +[Files_uninstall] +; Example for recursively deleting the installation directory: +; +; del -sf "$InstallDir$\" + +[Registry_uninstall] +; Example of deleting a registry key: +; +; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] + +[LinkFolder_uninstall] +; Example of deleting a folder from AllUsers startmenu: +; +; set_basefolder common_programs +; delete_subfolder $ProductId$ +; +; Example of deleting a shortcut from AllUsers desktop: +; +; set_basefolder common_desktopdirectory +; set_subfolder "" +; delete_element $ProductId$ + diff --git a/sample/source/4.0.6/opsi-template/CLIENT_DATA/use_include/setup_short32.opsiscript b/sample/source/4.0.6/opsi-template/CLIENT_DATA/use_include/setup_short32.opsiscript new file mode 100644 index 0000000..27f6983 --- /dev/null +++ b/sample/source/4.0.6/opsi-template/CLIENT_DATA/use_include/setup_short32.opsiscript @@ -0,0 +1,149 @@ +; Copyright (c) uib gmbh (www.uib.de) +; This sourcecode is owned by uib +; and published under the Terms of the General Public License. +; credits: http://www.opsi.org/en/credits/ + +[Actions] +requiredWinstVersion >= "4.11.4.6" +ScriptErrorMessages=off + +include_append "section_sub_check_exitcode.opsiinc" +include_append "section_sub_get_licensekey.opsiinc" + +DefVar $MsiId$ +DefVar $UninstallProgram$ +DefVar $LogDir$ +DefVar $ProductId$ +DefVar $MinimumSpace$ +DefVar $InstallDir$ +DefVar $ExitCode$ +DefVar $LicenseRequired$ +DefVar $LicenseKey$ +DefVar $LicensePool$ + +Set $LogDir$ = "%opsiLogDir%" + +; ---------------------------------------------------------------- +; - Please edit the following values - +; ---------------------------------------------------------------- +;$ProductId$ should be the name of the product in opsi +; therefore please: only lower letters, no umlauts, +; no white space use '-' as a seperator +Set $ProductId$ = "opsi-template" +Set $MinimumSpace$ = "1 MB" +; the path were we find the product after the installation +Set $InstallDir$ = "%ProgramFiles32Dir%\" +Set $LicenseRequired$ = "false" +Set $LicensePool$ = "p_" + $ProductId$ +; ---------------------------------------------------------------- + +if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) + LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ + isFatalError + ; Stop process and set installation status to failed +else + comment "Show product picture" + ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + + if FileExists("%ScriptPath%\delsub_short32.opsiscript") + comment "Start uninstall sub section" + Sub "%ScriptPath%\delsub_short32.opsiscript" + endif + + Message "Installing " + $ProductId$ + " ..." + + if $LicenseRequired$ = "true" + comment "Licensing required, reserve license and get license key" + Sub_get_licensekey + endif + + comment "Start setup program" + ChangeDirectory "%SCRIPTPATH%" + Winbatch_install + Sub_check_exitcode + + comment "Copy files" + Files_install /32Bit + + comment "Patch Registry" + Registry_install /32Bit + + comment "Create shortcuts" + LinkFolder_install + +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 "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb-! ALLUSERS=1 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=1 REBOOT=ReallySuppress" +; "%ScriptPath%\setup.exe" /s /v" /qb-! ALLUSERS=1 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 /nocancel /SUPPRESSMSGBOXES + +[Files_install] +; Example of recursively copying some files into the installation directory: +; +; copy -s "%ScriptPath%\files\*.*" "$InstallDir$" + +[Registry_install] +; Example of setting some values of an registry key: +; +; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] +; set "name1" = "some string value" +; set "name2" = REG_DWORD:0001 +; set "name3" = REG_BINARY:00 af 99 cd + +[LinkFolder_install] +; Example of deleting a folder from AllUsers startmenu: +; +; set_basefolder common_programs +; delete_subfolder $ProductId$ +; +; Example of creating an shortcut to the installed exe in AllUsers startmenu: +; +; set_basefolder common_programs +; set_subfolder $ProductId$ +; +; set_link +; name: $ProductId$ +; target: +; parameters: +; working_dir: $InstallDir$ +; icon_file: +; icon_index: +; end_link +; +; Example of creating an shortcut to the installed exe on AllUsers desktop: +; +; set_basefolder common_desktopdirectory +; set_subfolder "" +; +; set_link +; name: $ProductId$ +; target: +; parameters: +; working_dir: $InstallDir$ +; icon_file: +; icon_index: 2 +; end_link + + diff --git a/sample/source/4.0.6/opsi-template/CLIENT_DATA/use_include/uninstall_short32.opsiscript b/sample/source/4.0.6/opsi-template/CLIENT_DATA/use_include/uninstall_short32.opsiscript new file mode 100644 index 0000000..84b0519 --- /dev/null +++ b/sample/source/4.0.6/opsi-template/CLIENT_DATA/use_include/uninstall_short32.opsiscript @@ -0,0 +1,59 @@ +; Copyright (c) uib gmbh (www.uib.de) +; This sourcecode is owned by uib gmbh +; and published under the Terms of the General Public License. +; credits: http://www.opsi.org/en/credits/ + +[Actions] +requiredWinstVersion >= "4.11.4.6" +ScriptErrorMessages=off + +DefVar $MsiId$ +DefVar $UninstallProgram$ +DefVar $LogDir$ +DefVar $ExitCode$ +DefVar $ProductId$ +DefVar $InstallDir$ +DefVar $LicenseRequired$ +DefVar $LicensePool$ + +Set $LogDir$ = "%opsiLogDir%" + +; ---------------------------------------------------------------- +; - Please edit the following values - +; ---------------------------------------------------------------- +Set $ProductId$ = "opsi-template" +Set $InstallDir$ = "%ProgramFiles32Dir%\" +Set $LicenseRequired$ = "false" +Set $LicensePool$ = "p_" + $ProductId$ +; ---------------------------------------------------------------- + + +comment "Show product picture" +ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + +Message "Uninstalling " + $ProductId$ + " ..." + +if FileExists("%ScriptPath%\delsub_short32.opsiscript") + comment "Start uninstall sub section" + Sub "%ScriptPath%\delsub_short32.opsiscript" +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$) + diff --git a/sample/source/4.0.6/opsi-template/OPSI/control b/sample/source/4.0.6/opsi-template/OPSI/control new file mode 100644 index 0000000..b793c86 --- /dev/null +++ b/sample/source/4.0.6/opsi-template/OPSI/control @@ -0,0 +1,248 @@ +[Package] +version: 1 +depends: +incremental: False + +[Product] +type: localboot +id: opsi-template +name: opsi template product +description: A template for opsi products +advice: +version: 4.0.6 +priority: 0 +licenseRequired: False +productClasses: +setupScript: setup32.opsiscript +uninstallScript: uninstall32.opsiscript +updateScript: +alwaysScript: +onceScript: +customScript: +userLoginScript: login.opsiscript + +[ProductProperty] +type: unicode +name: dummy_prop +multivalue: False +editable: False +description: This is a dummy property ? +values: ["may_be", "no", "yes"] +default: ["yes"] + +[Changelog] +opsi-template (4.0.6-1) stable; urgency=low + + * setup*.*: fix: msi: /qb-! (instead of /qb!) + * requiredWinstVersion >= "4.11.4.6" + * ScriptErrorMessages=off + + -- detlef oertel Wed, 15 jul 2015 15:00:00 +0200 + +opsi-template (4.0.5-1) stable; urgency=low + + * setup*.*: fix: ALLUSERS=1 + * require opsi-winst 4.11.4 + * Set $LogDir$ = "%opsiLogDir%" + * all renamed from *.ins to *.opsiscript + * moved 64bit, 3264bit, short (with include) and delsub for multi msi to subfolders + * new property dummy_prop + + -- detlef oertel Mon, 03 Nov 2014 16:01:53 +0200 + +opsi-template (4.0.4-1) stable; urgency=low + + * delsub32.ins: use $msilist$ to delete multible possible msiids + + -- detlef oertel Thu, 27 Mar 2014 16:01:53 +0200 + +opsi-template (4.0.3-2) stable; urgency=low + + * added: ScriptErrorMessages=off + * requires: opsi-winst 4.11.3.6 + + -- detlef oertel Tue, 9 Jul 2013 16:01:53 +0200 + +opsi-template (4.0.3-1) stable; urgency=low + + * default is now without property and 32 Bit + + -- detlef oertel Thu, 27 Sep 2012 16:01:53 +0200 + + +opsi-template (4.0.2-2) stable; urgency=low + + * requiredWinstVersion >= "4.11.3.2" + * Set $LogDir$ = "%SystemDrive%\opsi.org\tmp" + * new: *_short32.opsiscript scripts with includes + * winbatch_install: changed inno-setup example: default without answer file + * winbatch_uninstall: changed NSIS example: /WaitForProcessEnding "Au_.exe" + + -- detlef oertel Fri, 03 Aug 2012 16:01:53 +0200 + +opsi-template (4.0.2-1) stable; urgency=low + + * requiredWinstVersion >= "4.11.2.6" + * added ChangeDirectory "%SCRIPTPATH%" + * changed delete to del (in delsub) + * changed at msi to ALLUSERS=1 + + -- detlef oertel Mon, 02 Jun 2012 16:01:53 +0200 + +opsi-template (4.0.1-5) stable; urgency=low + + * added /nocancel at Inno example + * added login.ins for 'user profile management' + * moved changelog to control file + + -- detlef oertel Mon, 02 Jan 2012 16:01:53 +0200 + + +opsi-template (4.0.1-4) stable; urgency=low + + * removed uncommented test for installation success via registry entries + + -- detlef oertel Thu, 30 Nov 2011 16:01:53 +0200 + + +opsi-template (4.0.1-3) stable; urgency=low + + * changed setup.ins to setup3264.ins (and so on ..) + * added /SUPPRESSMSGBOXES at Inno example + + -- detlef oertel Thu, 06 Oct 2011 16:01:53 +0200 + + +opsi-template (4.0.1-2) stable; urgency=low + + * bugfix: removed '\\' by '\' in showBitMap calls + + -- detlef oertel Tue, 02 Aug 2011 16:01:53 +0200 + + +opsi-template (4.0.1-1) stable; urgency=low + + * bugfix: delsub.ins: Set $UninstallProgram64$ = $InstallDir64$ + "\uninstall.exe" + + -- detlef oertel Wed, 18 Jan 2011 16:01:53 +0200 + + +opsi-template (4.0-1) stable; urgency=low + + * requires opsi.winst 4.10.8 + * default: 32Bit Version + * additional: 64Bit Version + * additional: 32/64Bit Version + + -- detlef oertel Wed, 18 Jan 2011 16:01:53 +0200 + + +opsi-template (1.0-20) stable; urgency=low + + * removed EnvVar("temp") + * all variable definitions at top + * new loglevel + * removed $NewExe$ + * more infos for inno setup + * removed number at showBitmap + * Initial section removed + * example for $installDir$ changed + + -- detlef oertel Wed, 14 Apr 2010 16:01:53 +0200 + + +opsi-template (1.0-19) stable; urgency=low + + * adding 'Installshield + MSI' to the Winbatch_install section + * changing to 'if $LicenseRequired$ = "true"' from 'if not ($LicenseRequired$ = "false")' + * changed from .ins to 'setup.ins' + + -- detlef oertel Tue, 26 Jan 2010 16:01:53 +0200 + + +opsi-template (1.0-18) stable; urgency=low + * bug fix in the successful request (comment out) + +opsi-template (1.0-17) stable; urgency=low + + * bug fix in delsub.ins : deleting a shortcut from AllUsers desktop + + -- detlef oertel Mon, 28 Sep 2009 16:01:53 +0200 + +opsi-template (1.0-16) stable; urgency=low + + * Added some examples for other installers + * Some cleanups + * More examples in other sections + + -- Jan Schneider Fri, 18 Sep 2009 13:01:53 +0200 + +opsi-template (1.0-15) stable; urgency=low + + * bugfix for delopsi-template + + -- Rupert Roeder Mon, 06 Jun 2009 11:15:00 +0100 + +opsi-template (1.0-14) stable; urgency=low + + * bugfix for delopsi-template + + -- Rupert Roeder Tue, 26 May 2009 11:15:00 +0100 + +opsi-template (1.0-13) stable; urgency=low + + * some corrections + + -- Rupert Roeder Tue, 26 May 2009 11:15:00 +0100 + +opsi-template (1.0-12) stable; urgency=low + + * code for license management added + + -- Rupert Roeder Tue, 19 May 2009 11:15:00 +0100 + +opsi-template (1.0-11) stable; urgency=low + + * sub_check_exitcode modified + * sub_check_exitcode 1641 added + * sub_check_exitcode integrated in delsub.ins + + -- Detlef Oertel Mon, 18 May 2009 14:15:00 +0100 + +opsi-template (1.0-10) stable; urgency=low + + * modified test on exit code added 3010 success restart required + -- bardo wolf + +opsi-template (1.0-9) stable; urgency=low + + * renamed from softprod to opsi-template + * added test on exit code + + -- Detlef Oertel Fri, 13 Mar 2009 12:35:32 +0100 + +opsi-template (1.0-8) stable; urgency=low + + * comment Anweisungen + * delsub: + Section: Files_uninstall + ;something like (don't forget the trailing backslash) + ;delete -sf "$InstallDir$\" + + -- Detlef Oertel Wed, 5 Nov 2008 17:00:00 +0100 + + + + + + + + + + + + + + + + diff --git a/sample/source/4.0.6/opsi-template/OPSI/postinst b/sample/source/4.0.6/opsi-template/OPSI/postinst new file mode 100644 index 0000000..a8e33fc --- /dev/null +++ b/sample/source/4.0.6/opsi-template/OPSI/postinst @@ -0,0 +1,9 @@ +#! /bin/sh +# +# postinst script for softprod +# This script executes after unpacking files from that archive and registering the product at the server. +# +# The following environment variables can be used to obtain information about the current installation: +# PRODUCT_ID: id of the current product +# CLIENT_DATA_DIR: directory which contains the installed client data +# diff --git a/sample/source/4.0.6/opsi-template/OPSI/preinst b/sample/source/4.0.6/opsi-template/OPSI/preinst new file mode 100644 index 0000000..15a5320 --- /dev/null +++ b/sample/source/4.0.6/opsi-template/OPSI/preinst @@ -0,0 +1,9 @@ +#! /bin/sh +# +# preinst script for softprod +# This script executes before that package will be unpacked from its archive file. +# +# The following environment variables can be used to obtain information about the current installation: +# PRODUCT_ID: id of the current product +# CLIENT_DATA_DIR: directory where client data will be installed +#