update to new opsi build
This commit is contained in:
parent
d1840b838a
commit
c348148c6b
@ -1,34 +1,48 @@
|
|||||||
; Copyright (c) uib gmbh (www.uib.de)
|
; Copyright (c) uib gmbh (www.uib.de)
|
||||||
; This sourcecode is owned by uib gmbh
|
; This sourcecode is owned by uib gmbh
|
||||||
; and published under the Terms of the General Public License.
|
; and published under the Terms of the General Public License.
|
||||||
; credits: http://www.opsi.org/credits/
|
; credits: http://www.opsi.org/en/credits/
|
||||||
|
|
||||||
|
|
||||||
Set $UninstallProgram32$ = $InstallDir32$ + "\unins000.exe"
|
Set $UninstallProgram32$ = $InstallDir32$ + "\uninstall.exe"
|
||||||
Set $UninstallProgram64$ = $InstallDir64$ + "\unins000.exe"
|
Set $UninstallProgramOld32$ = $InstallDir32$ + "\" + $UninstallProg32$
|
||||||
Set $IniFile32$ = $InstallDir32$ + "\opsi-" + $ProductId$ + ".ini"
|
Set $IniFile32$ = $InstallDir32$ + "\opsi-" + $ProductId$ + ".ini"
|
||||||
|
|
||||||
|
Set $UninstallProgram64$ = $InstallDir64$ + "\uninstall.exe"
|
||||||
|
Set $UninstallProgramOld64$ = $InstallDir64$ + "\" + $UninstallProg64$
|
||||||
Set $IniFile64$ = $InstallDir64$ + "\opsi-" + $ProductId$ + ".ini"
|
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 (($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($IniFile32$)
|
if FileExists($IniFile32$)
|
||||||
Set $MsiIdOld32$ = GetValueFromInifile($IniFile32$,"X86","MsiId32","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}")
|
Set $OLD_VERSION$ = GetValueFromInifile($IniFile32$,"COMMON","VERSION","")
|
||||||
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld32$ + "] DisplayName") = "")
|
Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile32$,"COMMON","CREATOR_TAG","")
|
||||||
comment "Old MSI id " + $MsiIdOld32$ + " found in registry, starting msiexec to uninstall old version"
|
Set $OLD_RELEASE$ = GetValueFromInifile($IniFile32$,"COMMON","RELEASE","")
|
||||||
Winbatch_uninstall_msi_old_32
|
|
||||||
sub_check_exitcode
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 32 Bit..."
|
||||||
|
|
||||||
|
if FileExists($IniFile32$)
|
||||||
|
Set $UninstallProgramOld32$ = GetValueFromInifile($IniFile$,"X86","UninstallProg32","XXXXXXXX.exe")
|
||||||
|
if FileExists($UninstallProgramOld32$)
|
||||||
|
comment "Uninstall program found, starting uninstall"
|
||||||
|
Winbatch_uninstall_old_32
|
||||||
|
sub_check_exitcode
|
||||||
|
endif
|
||||||
|
endif
|
||||||
if FileExists($UninstallProgram32$)
|
if FileExists($UninstallProgram32$)
|
||||||
comment "Uninstall program found, starting uninstall"
|
comment "Uninstall program found, starting uninstall"
|
||||||
Winbatch_uninstall_32
|
Winbatch_uninstall_32
|
||||||
sub_check_exitcode
|
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") = "")
|
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId32$ + "] DisplayName") = "")
|
||||||
comment "MSI id " + $MsiId32$ + " found in registry, starting msiexec to uninstall"
|
comment "MSI id " + $MsiId32$ + " found in registry, starting msiexec to uninstall"
|
||||||
Winbatch_uninstall_msi_32
|
Winbatch_uninstall_msi_32
|
||||||
@ -42,22 +56,36 @@ if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specif
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
|
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($IniFile64$)
|
if FileExists($IniFile64$)
|
||||||
Set $MsiIdOld64$ = GetValueFromInifile($IniFile64$,"X86_64","MsiId64","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}")
|
Set $OLD_VERSION$ = GetValueFromInifile($IniFile64$,"COMMON","VERSION","")
|
||||||
if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld64$ + "] DisplayName") = "")
|
Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile64$,"COMMON","CREATOR_TAG","")
|
||||||
comment "Old MSI id " + $MsiIdOld64$ + " found in registry, starting msiexec to uninstall old version"
|
Set $OLD_RELEASE$ = GetValueFromInifile($IniFile64$,"COMMON","RELEASE","")
|
||||||
Winbatch_uninstall_msi_old_64
|
|
||||||
sub_check_exitcode
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 64 Bit..."
|
||||||
|
|
||||||
|
if FileExists($IniFile64$)
|
||||||
|
Set $UninstallProgramOld64$ = GetValueFromInifile($IniFile$,"X86_64","UninstallProg64","XXXXXXXX.exe")
|
||||||
|
if FileExists($UninstallProgramOld64$)
|
||||||
|
comment "Uninstall program found, starting uninstall"
|
||||||
|
Winbatch_uninstall_old_64
|
||||||
|
sub_check_exitcode
|
||||||
|
endif
|
||||||
|
endif
|
||||||
if FileExists($UninstallProgram64$)
|
if FileExists($UninstallProgram64$)
|
||||||
comment "Uninstall program found, starting uninstall"
|
comment "Uninstall program found, starting uninstall"
|
||||||
Winbatch_uninstall_64
|
Winbatch_uninstall_64
|
||||||
sub_check_exitcode
|
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") = "")
|
if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId64$ + "] DisplayName") = "")
|
||||||
comment "MSI id " + $MsiId64$ + " found in registry, starting msiexec to uninstall"
|
comment "MSI id " + $MsiId64$ + " found in registry, starting msiexec to uninstall"
|
||||||
Winbatch_uninstall_msi_64
|
Winbatch_uninstall_msi_64
|
||||||
@ -73,15 +101,11 @@ endif
|
|||||||
comment "Delete program shortcuts"
|
comment "Delete program shortcuts"
|
||||||
LinkFolder_uninstall
|
LinkFolder_uninstall
|
||||||
|
|
||||||
[Winbatch_uninstall_32]
|
[Winbatch_uninstall_old_32]
|
||||||
; Choose one of the following examples as basis for program uninstall
|
"$UninstallProgramOld32$" /VERYSILENT
|
||||||
;
|
|
||||||
; === Nullsoft Scriptable Install System ================================================================
|
|
||||||
"$UninstallProgram32$" /VERYSILENT
|
|
||||||
;
|
|
||||||
; === Inno Setup ========================================================================================
|
|
||||||
; "$UninstallProgram32$" /silent /norestart /SUPPRESSMSGBOXES
|
|
||||||
|
|
||||||
|
[Winbatch_uninstall_32]
|
||||||
|
"$UninstallProgram32$" /VERYSILENT
|
||||||
|
|
||||||
[Winbatch_uninstall_msi_old_32]
|
[Winbatch_uninstall_msi_old_32]
|
||||||
msiexec /x $MsiIdOld32$ /qb! REBOOT=ReallySuppress
|
msiexec /x $MsiIdOld32$ /qb! REBOOT=ReallySuppress
|
||||||
@ -92,17 +116,13 @@ msiexec /x $MsiId32$ /qb! REBOOT=ReallySuppress
|
|||||||
[Files_uninstall_32]
|
[Files_uninstall_32]
|
||||||
; Example for recursively deleting the installation directory (don't forget the trailing backslash):
|
; Example for recursively deleting the installation directory (don't forget the trailing backslash):
|
||||||
;
|
;
|
||||||
delete -sf "$InstallDir32$\"
|
; delete -sf "$InstallDir32$\"
|
||||||
|
|
||||||
|
[Winbatch_uninstall_old_64]
|
||||||
|
"$UninstallProgramOld64$" /VERYSILENT
|
||||||
|
|
||||||
[Winbatch_uninstall_64]
|
[Winbatch_uninstall_64]
|
||||||
; Choose one of the following examples as basis for program uninstall
|
|
||||||
;
|
|
||||||
; === Nullsoft Scriptable Install System ================================================================
|
|
||||||
"$UninstallProgram64$" /VERYSILENT
|
"$UninstallProgram64$" /VERYSILENT
|
||||||
;
|
|
||||||
; === Inno Setup ========================================================================================
|
|
||||||
; "$UninstallProgram64$" /silent /norestart /SUPPRESSMSGBOXES
|
|
||||||
|
|
||||||
|
|
||||||
[Winbatch_uninstall_msi_old_64]
|
[Winbatch_uninstall_msi_old_64]
|
||||||
msiexec /x $MsiIdOld64$ /qb! REBOOT=ReallySuppress
|
msiexec /x $MsiIdOld64$ /qb! REBOOT=ReallySuppress
|
||||||
@ -111,9 +131,9 @@ msiexec /x $MsiIdOld64$ /qb! REBOOT=ReallySuppress
|
|||||||
msiexec /x $MsiId64$ /qb! REBOOT=ReallySuppress
|
msiexec /x $MsiId64$ /qb! REBOOT=ReallySuppress
|
||||||
|
|
||||||
[Files_uninstall_64]
|
[Files_uninstall_64]
|
||||||
; Example for recursively deleting the installation directory (don't forget the trailing backslash):
|
; Example for recursively deleting the installation directory:
|
||||||
;
|
;
|
||||||
delete -sf "$InstallDir64$\"
|
; del -sf "$InstallDir64$\"
|
||||||
|
|
||||||
[Registry_uninstall]
|
[Registry_uninstall]
|
||||||
; Example of deleting a registry key:
|
; Example of deleting a registry key:
|
||||||
|
24
CLIENT_DATA/login.ins
Normal file
24
CLIENT_DATA/login.ins
Normal file
@ -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"
|
@ -1,18 +1,18 @@
|
|||||||
; Copyright (c) uib gmbh (www.uib.de)
|
; Copyright (c) uib gmbh (www.uib.de)
|
||||||
; This sourcecode is owned by uib
|
; This sourcecode is owned by uib
|
||||||
; and published under the Terms of the General Public License.
|
; and published under the Terms of the General Public License.
|
||||||
; credits: http://www.opsi.org/credits/
|
; credits: http://www.opsi.org/en/credits/
|
||||||
|
|
||||||
[Actions]
|
[Actions]
|
||||||
requiredWinstVersion >= "4.10.8.6"
|
requiredWinstVersion >= "4.11.2.6"
|
||||||
|
|
||||||
; DefVar $MsiId32$
|
|
||||||
DefVar $MsiIdOld32$
|
DefVar $MsiIdOld32$
|
||||||
DefVar $UninstallProgram32$
|
DefVar $UninstallProgram32$
|
||||||
|
DefVar $UninstallProgramOld32$
|
||||||
DefVar $IniFile32$
|
DefVar $IniFile32$
|
||||||
; DefVar $MsiId64$
|
|
||||||
DefVar $MsiIdOld64$
|
DefVar $MsiIdOld64$
|
||||||
DefVar $UninstallProgram64$
|
DefVar $UninstallProgram64$
|
||||||
|
DefVar $UninstallProgramOld64$
|
||||||
DefVar $IniFile64$
|
DefVar $IniFile64$
|
||||||
DefVar $IniCfgFile$
|
DefVar $IniCfgFile$
|
||||||
DefVar $LogDir$
|
DefVar $LogDir$
|
||||||
@ -21,16 +21,15 @@ DefVar $MinimumSpace$
|
|||||||
DefVar $InstallDir32$
|
DefVar $InstallDir32$
|
||||||
DefVar $InstallDir64$
|
DefVar $InstallDir64$
|
||||||
DefVar $ExitCode$
|
DefVar $ExitCode$
|
||||||
DefVar $LicenseRequired$
|
|
||||||
DefVar $LicenseKey$
|
|
||||||
DefVar $LicensePool$
|
|
||||||
DefVar $INST_SystemType$
|
DefVar $INST_SystemType$
|
||||||
DefVar $INST_architecture$
|
DefVar $INST_architecture$
|
||||||
|
DefVar $OLD_VERSION$
|
||||||
|
DefVar $OLD_CREATOR_TAG$
|
||||||
|
DefVar $OLD_RELEASE$
|
||||||
|
|
||||||
Set $INST_SystemType$ = GetSystemType
|
Set $INST_SystemType$ = GetSystemType
|
||||||
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
|
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
|
||||||
|
|
||||||
|
|
||||||
Set $LogDir$ = "%SystemDrive%\tmp"
|
Set $LogDir$ = "%SystemDrive%\tmp"
|
||||||
|
|
||||||
; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh
|
; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh
|
||||||
@ -49,39 +48,33 @@ Set $LogDir$ = "%SystemDrive%\tmp"
|
|||||||
;$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,
|
; therefore please: only lower letters, no umlauts,
|
||||||
; no white space use '-' as a seperator
|
; no white space use '-' as a seperator
|
||||||
Set $ProductId$ = "cdburnerxp.cdburnerxp"
|
|
||||||
Set $MinimumSpace$ = "30 MB"
|
Set $MinimumSpace$ = "30 MB"
|
||||||
; the path were we find the product after the installation
|
; the path were we find the product after the installation
|
||||||
Set $InstallDir32$ = "%ProgramFiles32Dir%\CDBurnerXP"
|
Set $InstallDir32$ = "%ProgramFiles32Dir%\CDBurnerXP"
|
||||||
Set $InstallDir64$ = "%ProgramFiles64Dir%\CDBurnerXP"
|
Set $InstallDir64$ = "%ProgramFiles64Dir%\CDBurnerXP"
|
||||||
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"
|
|
||||||
Set $LicenseRequired$ = "false"
|
|
||||||
Set $LicensePool$ = "p_" + $ProductId$
|
|
||||||
; ----------------------------------------------------------------
|
; ----------------------------------------------------------------
|
||||||
|
|
||||||
|
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"
|
||||||
|
|
||||||
if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
|
if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
|
||||||
LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$
|
LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$
|
||||||
isFatalError
|
isFatalError
|
||||||
; Stop process and set installation status to failed
|
; Stop process and set installation status to failed
|
||||||
else
|
else
|
||||||
comment "Show product picture"
|
comment "Show product picture"
|
||||||
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
|
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$
|
||||||
|
|
||||||
if FileExists("%ScriptPath%\delsub3264.ins")
|
if FileExists("%ScriptPath%\delsub3264.ins")
|
||||||
comment "Start uninstall sub section"
|
comment "Start uninstall sub section"
|
||||||
Sub "%ScriptPath%\delsub3264.ins"
|
Sub "%ScriptPath%\delsub3264.ins"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if $LicenseRequired$ = "true"
|
|
||||||
comment "Licensing required, reserve license and get license key"
|
|
||||||
Sub_get_licensekey
|
|
||||||
endif
|
|
||||||
|
|
||||||
comment "installing"
|
comment "installing"
|
||||||
|
|
||||||
if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
|
if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
|
||||||
Message "Installing " + $ProductId$ + " 32 Bit..."
|
Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 32 Bit..."
|
||||||
comment "Start setup program"
|
comment "Start setup program"
|
||||||
|
ChangeDirectory "%SCRIPTPATH%"
|
||||||
Winbatch_install_32
|
Winbatch_install_32
|
||||||
Sub_check_exitcode
|
Sub_check_exitcode
|
||||||
comment "Copy files"
|
comment "Copy files"
|
||||||
@ -93,8 +86,9 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
|
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..."
|
Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 64 Bit..."
|
||||||
comment "Start setup program"
|
comment "Start setup program"
|
||||||
|
ChangeDirectory "%SCRIPTPATH%"
|
||||||
Winbatch_install_64
|
Winbatch_install_64
|
||||||
Sub_check_exitcode
|
Sub_check_exitcode
|
||||||
comment "Copy files"
|
comment "Copy files"
|
||||||
@ -108,11 +102,10 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
[Winbatch_install_32]
|
[Winbatch_install_32]
|
||||||
; === MSI package =======================================================================================
|
msiexec /i "$Install32Msi$" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress
|
||||||
; You may use the parameter PIDKEY=$Licensekey$
|
|
||||||
msiexec /i "$Install32Msi$" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 REBOOT=ReallySuppress
|
|
||||||
|
|
||||||
[Files_install_32]
|
[Files_install_32]
|
||||||
|
; copy the ini file to the InstallDir
|
||||||
copy "$IniCfgFile$" "$InstallDir32$"
|
copy "$IniCfgFile$" "$InstallDir32$"
|
||||||
|
|
||||||
; Example of recursively copying some files into the installation directory:
|
; Example of recursively copying some files into the installation directory:
|
||||||
@ -120,11 +113,10 @@ copy "$IniCfgFile$" "$InstallDir32$"
|
|||||||
; copy -s "%ScriptPath%\files\*.*" "$InstallDir32$"
|
; copy -s "%ScriptPath%\files\*.*" "$InstallDir32$"
|
||||||
|
|
||||||
[Winbatch_install_64]
|
[Winbatch_install_64]
|
||||||
; === MSI package =======================================================================================
|
msiexec /i "$Install64Msi$" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress
|
||||||
; You may use the parameter PIDKEY=$Licensekey$
|
|
||||||
msiexec /i "$Install64Msi$" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 REBOOT=ReallySuppress
|
|
||||||
|
|
||||||
[Files_install_64]
|
[Files_install_64]
|
||||||
|
; copy the ini file to the InstallDir
|
||||||
copy "$IniCfgFile$" "$InstallDir64$"
|
copy "$IniCfgFile$" "$InstallDir64$"
|
||||||
|
|
||||||
; Example of recursively copying some files into the installation directory:
|
; Example of recursively copying some files into the installation directory:
|
||||||
@ -173,38 +165,6 @@ copy "$IniCfgFile$" "$InstallDir64$"
|
|||||||
; icon_index: 2
|
; icon_index: 2
|
||||||
; end_link
|
; 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]
|
[Sub_check_exitcode]
|
||||||
comment "Test for installation success via exit code"
|
comment "Test for installation success via exit code"
|
||||||
set $ExitCode$ = getLastExitCode
|
set $ExitCode$ = getLastExitCode
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
; Copyright (c) uib gmbh (www.uib.de)
|
; Copyright (c) uib gmbh (www.uib.de)
|
||||||
; This sourcecode is owned by uib gmbh
|
; This sourcecode is owned by uib gmbh
|
||||||
; and published under the Terms of the General Public License.
|
; and published under the Terms of the General Public License.
|
||||||
; credits: http://www.opsi.org/credits/
|
; credits: http://www.opsi.org/en/credits/
|
||||||
|
|
||||||
[Actions]
|
[Actions]
|
||||||
requiredWinstVersion >= "4.10.8.6"
|
requiredWinstVersion >= "4.11.2.6"
|
||||||
|
|
||||||
; DefVar $MsiId32$
|
|
||||||
DefVar $MsiIdOld32$
|
DefVar $MsiIdOld32$
|
||||||
DefVar $UninstallProgram32$
|
DefVar $UninstallProgram32$
|
||||||
|
DefVar $UninstallProgramOld32$
|
||||||
DefVar $IniFile32$
|
DefVar $IniFile32$
|
||||||
; DefVar $MsiId64$
|
|
||||||
DefVar $MsiIdOld64$
|
DefVar $MsiIdOld64$
|
||||||
DefVar $UninstallProgram64$
|
DefVar $UninstallProgram64$
|
||||||
|
DefVar $UninstallProgramOld64$
|
||||||
DefVar $IniFile64$
|
DefVar $IniFile64$
|
||||||
DefVar $IniCfgFile$
|
DefVar $IniCfgFile$
|
||||||
DefVar $LogDir$
|
DefVar $LogDir$
|
||||||
@ -20,15 +20,15 @@ DefVar $ExitCode$
|
|||||||
DefVar $ProductId$
|
DefVar $ProductId$
|
||||||
DefVar $InstallDir32$
|
DefVar $InstallDir32$
|
||||||
DefVar $InstallDir64$
|
DefVar $InstallDir64$
|
||||||
DefVar $LicenseRequired$
|
|
||||||
DefVar $LicensePool$
|
|
||||||
DefVar $INST_SystemType$
|
DefVar $INST_SystemType$
|
||||||
DefVar $INST_architecture$
|
DefVar $INST_architecture$
|
||||||
|
DefVar $OLD_VERSION$
|
||||||
|
DefVar $OLD_CREATOR_TAG$
|
||||||
|
DefVar $OLD_RELEASE$
|
||||||
|
|
||||||
Set $INST_SystemType$ = GetSystemType
|
Set $INST_SystemType$ = GetSystemType
|
||||||
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
|
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
|
||||||
|
|
||||||
|
|
||||||
Set $LogDir$ = "%SystemDrive%\tmp"
|
Set $LogDir$ = "%SystemDrive%\tmp"
|
||||||
|
|
||||||
; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh
|
; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh
|
||||||
@ -44,16 +44,14 @@ Set $LogDir$ = "%SystemDrive%\tmp"
|
|||||||
; ----------------------------------------------------------------
|
; ----------------------------------------------------------------
|
||||||
; - Please edit the following values -
|
; - Please edit the following values -
|
||||||
; ----------------------------------------------------------------
|
; ----------------------------------------------------------------
|
||||||
Set $ProductId$ = "cdburnerxp.cdburnerxp"
|
|
||||||
Set $InstallDir32$ = "%ProgramFiles32Dir%\CDBurnerXP"
|
Set $InstallDir32$ = "%ProgramFiles32Dir%\CDBurnerXP"
|
||||||
Set $InstallDir64$ = "%ProgramFiles64Dir%\CDBurnerXP"
|
Set $InstallDir64$ = "%ProgramFiles64Dir%\CDBurnerXP"
|
||||||
Set $LicenseRequired$ = "false"
|
|
||||||
Set $LicensePool$ = "p_" + $ProductId$
|
|
||||||
; ----------------------------------------------------------------
|
; ----------------------------------------------------------------
|
||||||
|
|
||||||
|
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"
|
||||||
|
|
||||||
comment "Show product picture"
|
comment "Show product picture"
|
||||||
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
|
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$
|
||||||
|
|
||||||
Message "Uninstalling " + $ProductId$ + " ..."
|
Message "Uninstalling " + $ProductId$ + " ..."
|
||||||
|
|
||||||
@ -62,23 +60,3 @@ if FileExists("%ScriptPath%\delsub3264.ins")
|
|||||||
Sub "%ScriptPath%\delsub3264.ins"
|
Sub "%ScriptPath%\delsub3264.ins"
|
||||||
endif
|
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$)
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -30,12 +30,18 @@ DL_WINST_NAME[2]=Install64Msi
|
|||||||
# File array index for the image showing while installing the program
|
# File array index for the image showing while installing the program
|
||||||
ICON_DL_INDEX=0
|
ICON_DL_INDEX=0
|
||||||
|
|
||||||
|
OPSI_INI_SECTION[0]="X86"
|
||||||
|
OPSI_INI_OPTION[0]="MsiId32"
|
||||||
|
OPSI_INI_VALUE[0]="{3867AA1B-BF01-4492-9E3A-DA032C94F424}"
|
||||||
|
|
||||||
WINST_NAME[0]="MsiId32"
|
OPSI_INI_SECTION[1]="X86_64"
|
||||||
WINST_VALUE[0]="{3867AA1B-BF01-4492-9E3A-DA032C94F424}"
|
OPSI_INI_OPTION[1]="MsiId64"
|
||||||
|
OPSI_INI_VALUE[1]="{2049837C-257A-4F11-BC7B-2EAC6C043B26}"
|
||||||
|
|
||||||
WINST_NAME[1]="MsiId64"
|
|
||||||
WINST_VALUE[1]="{2049837C-257A-4F11-BC7B-2EAC6C043B26}"
|
|
||||||
|
|
||||||
|
OPSI_INI_SECTION[2]="X86"
|
||||||
|
OPSI_INI_OPTION[2]="UninstallProg32"
|
||||||
|
OPSI_INI_VALUE[2]="unins000.exe"
|
||||||
|
|
||||||
|
OPSI_INI_SECTION[3]="X86_64"
|
||||||
|
OPSI_INI_OPTION[3]="UninstallProg64"
|
||||||
|
OPSI_INI_VALUE[3]="unins000.exe"
|
||||||
|
Loading…
Reference in New Issue
Block a user