Add new 32bit templates
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
; Opsi Builder to automate the creation of Opsi packages for the Opsi System
|
||||
; Copyright (C) 2012 Daniel Schwager
|
||||
; Copyright (C) 2014 Mario Fetka
|
||||
;
|
||||
; This program is free software: you can redistribute it and/or modify
|
||||
; it under the terms of the GNU Affero General Public License as
|
||||
; published by the Free Software Foundation, either version 3 of the
|
||||
; License, or (at your option) any later version.
|
||||
;
|
||||
; This program is distributed in the hope that it will be useful,
|
||||
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
; GNU Affero General Public License for more details.
|
||||
;
|
||||
; You should have received a copy of the GNU Affero General Public License
|
||||
; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
[ExecWith_BrowserKill]
|
||||
Option Explicit
|
||||
KillBrowsers()
|
||||
|
||||
Sub KillBrowsers()
|
||||
'Declare variables
|
||||
Dim i
|
||||
Dim wmiSvc,WQL,Processes,Process
|
||||
Dim arrBrowserProcesses(9)
|
||||
|
||||
'Initialize variables
|
||||
arrBrowserProcesses(0)="iexplore.exe"
|
||||
arrBrowserProcesses(1)="chrome.exe"
|
||||
arrBrowserProcesses(2)="firefox.exe"
|
||||
arrBrowserProcesses(3)="safari.exe"
|
||||
arrBrowserProcesses(4)="opera.exe"
|
||||
arrBrowserProcesses(5)="vivaldi.exe"
|
||||
arrBrowserProcesses(6)="iron.exe"
|
||||
arrBrowserProcesses(7)="MicrosoftEdge.exe"
|
||||
arrBrowserProcesses(8)="msedge.exe"
|
||||
|
||||
Set wmiSvc = GetObject("winmgmts:\\.\root\cimv2")
|
||||
For i = 0 To UBound(arrBrowserProcesses)
|
||||
wql = "SELECT * FROM Win32_Process WHERE Name='" & arrBrowserProcesses(i) & "'"
|
||||
Set processes = wmiSvc.ExecQuery(wql)
|
||||
Do While processes.Count > 0
|
||||
For Each process In processes
|
||||
process.Terminate
|
||||
Next
|
||||
WScript.Sleep 200
|
||||
Set processes = wmiSvc.ExecQuery(wql)
|
||||
Loop
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
;Request ExitCode from last Program
|
||||
set $ExitCode$ = getLastExitCode
|
||||
|
||||
;Modify Loglevel
|
||||
setLogLevel = 4
|
||||
|
||||
;Check ExitCode
|
||||
|
||||
if ($ExitCode$ = "0")
|
||||
setLogLevel = 5
|
||||
comment "ExitCode = "+$ExitCode$+" Setup was successfully run to completion."
|
||||
setLogLevel = 4
|
||||
endif
|
||||
|
||||
if ($ExitCode$ = "1")
|
||||
setLogLevel = 5
|
||||
logError "ExitCode = "+$ExitCode$+" Setup failed to initialize."
|
||||
isFatalError
|
||||
endif
|
||||
|
||||
if ($ExitCode$ = "2")
|
||||
setLogLevel = 5
|
||||
logError "ExitCode = "+$ExitCode$+" The user clicked Cancel in the wizard before the actual installation started, or chose "No" on the opening "This will install..." message box."
|
||||
isFatalError
|
||||
endif
|
||||
|
||||
if ($ExitCode$ = "3")
|
||||
setLogLevel = 5
|
||||
logError "ExitCode = "+$ExitCode$+" A fatal error occurred while preparing to move to the next installation phase (for example, from displaying the pre-installation wizard pages to the actual installation process). This should never happen except under the most unusual of circumstances, such as running out of memory or Windows resources."
|
||||
isFatalError
|
||||
endif
|
||||
|
||||
if ($ExitCode$ = "4")
|
||||
setLogLevel = 5
|
||||
logError "ExitCode = "+$ExitCode$+" A fatal error occurred during the actual installation process."
|
||||
isFatalError
|
||||
endif
|
||||
|
||||
if ($ExitCode$ = "5")
|
||||
setLogLevel = 5
|
||||
logError "ExitCode = "+$ExitCode$+" The user clicked Cancel during the actual installation process, or chose Abort at an Abort-Retry-Ignore box."
|
||||
isFatalError
|
||||
endif
|
||||
|
||||
if ($ExitCode$ = "6")
|
||||
setLogLevel = 5
|
||||
logError "ExitCode = "+$ExitCode$+" The Setup process was forcefully terminated by the debugger (Run | Terminate was used in the IDE)."
|
||||
isFatalError
|
||||
endif
|
||||
|
||||
;Modify Loglevel
|
||||
setLogLevel = 6
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
;Request Exitcode of last Program
|
||||
set $ExitCode$ = getLastExitCode
|
||||
|
||||
;Modify Loglevel
|
||||
setLogLevel = 4
|
||||
|
||||
;Check ExitCode
|
||||
|
||||
if ($ExitCode$ = "0")
|
||||
setLogLevel = 5
|
||||
comment "ExitCode = "+$ExitCode$+" Success"
|
||||
setLogLevel = 4
|
||||
endif
|
||||
|
||||
if ($ExitCode$ = "-1")
|
||||
logError "ExitCode = "+$ExitCode$+" General error"
|
||||
isFatalError
|
||||
endif
|
||||
|
||||
if ($ExitCode$ = "-2")
|
||||
logError "ExitCode = "+$ExitCode$+" Invalid mode"
|
||||
isFatalError
|
||||
endif
|
||||
|
||||
if ($ExitCode$ = "-3")
|
||||
logError "ExitCode = "+$ExitCode$+" Required data not found in the Setup.iss file"
|
||||
isFatalError
|
||||
endif
|
||||
|
||||
if ($ExitCode$ = "-4")
|
||||
logError "ExitCode = "+$ExitCode$+" Not enough memory available"
|
||||
isFatalError
|
||||
endif
|
||||
|
||||
if ($ExitCode$ = "-5")
|
||||
logError "ExitCode = "+$ExitCode$+" File does not exist"
|
||||
isFatalError
|
||||
endif
|
||||
|
||||
if ($ExitCode$ = "-6")
|
||||
logError "ExitCode = "+$ExitCode$+" Cannot write to the response file"
|
||||
isFatalError
|
||||
endif
|
||||
|
||||
if ($ExitCode$ = "-7")
|
||||
logError "ExitCode = "+$ExitCode$+" Unable to write to the log file"
|
||||
isFatalError
|
||||
endif
|
||||
|
||||
if ($ExitCode$ = "-8")
|
||||
logError "ExitCode = "+$ExitCode$+" Invalid path to the InstallShield Silent response file"
|
||||
isFatalError
|
||||
endif
|
||||
|
||||
if ($ExitCode$ = "-9")
|
||||
logError "ExitCode = "+$ExitCode$+" Not a valid list type (string or number)"
|
||||
isFatalError
|
||||
endif
|
||||
|
||||
if ($ExitCode$ = "-10")
|
||||
logError "ExitCode = "+$ExitCode$+" Data type is invalid"
|
||||
isFatalError
|
||||
endif
|
||||
|
||||
if ($ExitCode$ = "-11")
|
||||
logError "ExitCode = "+$ExitCode$+" Unknown error during setup"
|
||||
isFatalError
|
||||
endif
|
||||
|
||||
if ($ExitCode$ = "-12")
|
||||
logError "ExitCode = "+$ExitCode$+" Dialogs are out of order"
|
||||
isFatalError
|
||||
endif
|
||||
|
||||
if ($ExitCode$ = "-51")
|
||||
logError "ExitCode = "+$ExitCode$+" Cannot create the specified folder"
|
||||
isFatalError
|
||||
endif
|
||||
|
||||
if ($ExitCode$ = "-52")
|
||||
logError "ExitCode = "+$ExitCode$+" Cannot access the specified file or folder"
|
||||
isFatalError
|
||||
endif
|
||||
|
||||
if ($ExitCode$ = "-53")
|
||||
logError "ExitCode = "+$ExitCode$+" Invalid option selected"
|
||||
isFatalError
|
||||
endif
|
||||
|
||||
;Modify Loglevel
|
||||
setLogLevel = 6
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
;Request ExitCode from last Program
|
||||
set $ExitCode$ = getLastExitCode
|
||||
|
||||
;Modify Loglevel
|
||||
setLogLevel = 4
|
||||
|
||||
;Check ExitCode
|
||||
|
||||
if ($ExitCode$ = "0")
|
||||
setLogLevel = 5
|
||||
comment "ExitCode = "+$ExitCode$+" Normal execution (no error)"
|
||||
setLogLevel = 4
|
||||
endif
|
||||
|
||||
if ($ExitCode$ = "1")
|
||||
setLogLevel = 5
|
||||
logError "ExitCode = "+$ExitCode$+" Installation aborted by user (cancel button)"
|
||||
isFatalError
|
||||
endif
|
||||
|
||||
if ($ExitCode$ = "2")
|
||||
setLogLevel = 5
|
||||
logError "ExitCode = "+$ExitCode$+" Installation aborted by script"
|
||||
isFatalError
|
||||
endif
|
||||
|
||||
;Modify Loglevel
|
||||
setLogLevel = 6
|
||||
|
||||
@@ -3,32 +3,46 @@
|
||||
; and published under the Terms of the General Public License.
|
||||
; credits: http://www.opsi.org/en/credits/
|
||||
|
||||
include_append "%ScriptPath%\browserkill.opsiinc"
|
||||
|
||||
Set $UninstallProgram$ = $InstallDir$ + "\" + $UninstallProg$
|
||||
Set $UninstallProgram$ = $InstallDir$ + "\" + $UninstallExecutable$
|
||||
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","")
|
||||
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 $UninstallProgramOld$ = $InstallDir$ + "\" + $UninstallProg$
|
||||
Set $UninstallExecutable$ = GetValueFromInifile($IniFile$,"X86","UninstallExecutable","XXXXXXXX.exe")
|
||||
Set $UninstallProgramOld$ = $InstallDir$ + "\" + $UninstallExecutable$
|
||||
if FileExists($UninstallProgramOld$)
|
||||
comment "Uninstall program found, starting uninstall"
|
||||
Winbatch_uninstall_old
|
||||
;Sub "%ScriptPath%\check_innosetup-exitcode.opsiscript"
|
||||
;Sub "%ScriptPath%\check_installshield-exitcode.opsiscript"
|
||||
;Sub "%ScriptPath%\check_nullsoft-exitcode.opsiscript"
|
||||
sub_check_exitcode
|
||||
;set $Reboot$="1"
|
||||
endif
|
||||
endif
|
||||
if FileExists($UninstallProgram$)
|
||||
comment "Uninstall program found, starting uninstall"
|
||||
Winbatch_uninstall
|
||||
;Sub "%ScriptPath%\check_innosetup-exitcode.opsiscript"
|
||||
;Sub "%ScriptPath%\check_installshield-exitcode.opsiscript"
|
||||
;Sub "%ScriptPath%\check_nullsoft-exitcode.opsiscript"
|
||||
sub_check_exitcode
|
||||
;set $Reboot$="1"
|
||||
endif
|
||||
|
||||
;comment "Kill Web Browser"
|
||||
;ExecWith_BrowserKill %System%\cscript.exe //b //nologo
|
||||
|
||||
comment "Delete files"
|
||||
Files_uninstall /32Bit
|
||||
|
||||
@@ -38,34 +52,53 @@ Registry_uninstall /32Bit
|
||||
comment "Delete program shortcuts"
|
||||
LinkFolder_uninstall
|
||||
|
||||
Set $Property_FileTypeAssociation$ = GetProductProperty("FileTypeAssociation","true")
|
||||
if ($Property_FileTypeAssociation$ = "true")
|
||||
comment "File Type Association"
|
||||
DosInAnIcon_FileTypeAssoc_uninstall
|
||||
endif
|
||||
|
||||
DefVar $Property_CustomPostUninstall$
|
||||
Set $Property_CustomPostUninstall$ = getProductProperty("custom-post-uninstall","none")
|
||||
if not ($Property_CustomPostUninstall$ = "none")
|
||||
comment "Include custom post uninstall file"
|
||||
if FileExists("%ScriptPath%\custom\" + $Property_CustomPostUninstall$)
|
||||
sub_CustomPostUninstall
|
||||
else
|
||||
LogError "Include script NOT exists (" + $Property_CustomPostUninstall$ +")"
|
||||
endif
|
||||
endif
|
||||
|
||||
if $Reboot$="1"
|
||||
ExitWindows /ImmediateReboot
|
||||
endif
|
||||
|
||||
[Winbatch_uninstall_old]
|
||||
; 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
|
||||
|
||||
|
||||
[Files_uninstall]
|
||||
; Example for recursively deleting the installation directory:
|
||||
;
|
||||
del -sf "$InstallDir$\"
|
||||
; del -sf "$InstallDir$\"
|
||||
|
||||
[Registry_uninstall]
|
||||
; Example of deleting a registry key:
|
||||
@@ -73,6 +106,10 @@ del -sf "$InstallDir$\"
|
||||
; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$]
|
||||
|
||||
[LinkFolder_uninstall]
|
||||
set_basefolder common_desktopdirectory
|
||||
set_subfolder ""
|
||||
delete_element $NAME$
|
||||
|
||||
; Example of deleting a folder from AllUsers startmenu:
|
||||
;
|
||||
; set_basefolder common_programs
|
||||
@@ -84,6 +121,20 @@ del -sf "$InstallDir$\"
|
||||
; set_subfolder ""
|
||||
; delete_element $ProductId$
|
||||
|
||||
[DosInAnIcon_FileTypeAssoc_uninstall]
|
||||
; Requires danysys.sfta
|
||||
; Sample Usage:
|
||||
; Set Acrobat Reader DC as Default .pdf reader:
|
||||
;
|
||||
; SFTA --unreg AcroExch.Document.DC .pdf
|
||||
;
|
||||
; Set Sumatra PDF as Default .pdf reader:
|
||||
;
|
||||
; SFTA --unreg Applications\SumatraPDF.exe .pdf
|
||||
|
||||
[sub_CustomPostUninstall]
|
||||
include_insert "%ScriptPath%\custom\" + $Property_CustomPostUninstall$
|
||||
|
||||
[Sub_check_exitcode]
|
||||
comment "Test for installation success via exit code"
|
||||
set $ExitCode$ = getLastExitCode
|
||||
@@ -1,5 +1,7 @@
|
||||
[X86]
|
||||
|
||||
[X86_64]
|
||||
|
||||
[COMMON]
|
||||
PN=name
|
||||
VERSION=version
|
||||
|
||||
@@ -4,7 +4,10 @@
|
||||
; credits: http://www.opsi.org/en/credits/
|
||||
|
||||
[Actions]
|
||||
requiredWinstVersion >= "4.11.2.6"
|
||||
requiredWinstVersion >= "4.11.4.6"
|
||||
ScriptErrorMessages=off
|
||||
|
||||
include_append "%ScriptPath%\browserkill.opsiinc"
|
||||
|
||||
DefVar $UninstallProgram$
|
||||
DefVar $UninstallProgramOld$
|
||||
@@ -22,7 +25,20 @@ DefVar $OLD_VERSION$
|
||||
DefVar $OLD_CREATOR_TAG$
|
||||
DefVar $OLD_RELEASE$
|
||||
|
||||
Set $LogDir$ = "%SystemDrive%\tmp"
|
||||
DefVar $Reboot$
|
||||
DefVar $CheckOsVersion$
|
||||
|
||||
DefStringList $languageInfo$
|
||||
set $languageInfo$ = getLocaleInfoMap
|
||||
DefVar $LanguageId$
|
||||
set $LanguageId$ = getValue("default_language_id_decimal", $languageInfo$)
|
||||
|
||||
;Property Variables
|
||||
DefVar $Property_CustomPostInstall$
|
||||
DefVar $Property_DesktopLink$
|
||||
DefVar $Property_FileTypeAssociation$
|
||||
|
||||
Set $LogDir$ = "%opsiLogDir%"
|
||||
|
||||
; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh
|
||||
; and adds the following variables:
|
||||
@@ -34,10 +50,19 @@ Set $LogDir$ = "%SystemDrive%\tmp"
|
||||
;
|
||||
@@BUILDER_VARIABLES@@
|
||||
|
||||
; -----------------------------------------------------
|
||||
; Minimal Supported OS (comment all other entries)
|
||||
set $CheckOsVersion$ = "5.1" ; Windows XP
|
||||
; set $CheckOsVersion$ = "5.2" ; Windows XP 64
|
||||
; set $CheckOsVersion$ = "6.0" ; Windows Vista
|
||||
; set $CheckOsVersion$ = "6.1" ; Windows 7
|
||||
; set $CheckOsVersion$ = "6.2" ; Windows 8
|
||||
; set $CheckOsVersion$ = "6.3" ; Windows 8.1
|
||||
; set $CheckOsVersion$ = "10.0" ; Windows 10
|
||||
; ----------------------------------------------------------------
|
||||
; - 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"
|
||||
@@ -49,6 +74,12 @@ Set $LicensePool$ = "p_" + $ProductId$
|
||||
|
||||
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"
|
||||
|
||||
; Check Minimalen OS Version
|
||||
if not(CompareDotSeparatedNumbers(GetMsVersionInfo, ">=", $CheckOsVersion$))
|
||||
LogError "This Operating System (" + GetNtVersion + " " + GetSystemType + ") is not supported by this Product (" + $ProductId$ + ")!"
|
||||
isFatalError
|
||||
endif
|
||||
|
||||
if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
|
||||
LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$
|
||||
isFatalError "No Space"
|
||||
@@ -57,9 +88,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$ + " ..."
|
||||
@@ -72,17 +103,47 @@ else
|
||||
comment "Start setup program"
|
||||
ChangeDirectory "%SCRIPTPATH%"
|
||||
Winbatch_install
|
||||
;Sub "%ScriptPath%\check_innosetup-exitcode.opsiscript"
|
||||
;Sub "%ScriptPath%\check_installshield-exitcode.opsiscript"
|
||||
;Sub "%ScriptPath%\check_nullsoft-exitcode.opsiscript"
|
||||
Sub_check_exitcode
|
||||
|
||||
comment "Copy files"
|
||||
Files_install /32Bit
|
||||
|
||||
;comment "Kill Web Browser"
|
||||
;ExecWith_BrowserKill %System%\cscript.exe //b //nologo
|
||||
|
||||
comment "Disable Update check"
|
||||
DosInAnIcon_DisableUpdate
|
||||
|
||||
comment "Patch Registry"
|
||||
Registry_install /32Bit
|
||||
|
||||
comment "Create shortcuts"
|
||||
LinkFolder_install
|
||||
|
||||
Set $Property_DesktopLink$ = GetProductProperty("DesktopLink","false")
|
||||
if ($Property_DesktopLink$ = "true")
|
||||
LinkFolder_install_DesktopLink
|
||||
endif
|
||||
|
||||
Set $Property_FileTypeAssociation$ = GetProductProperty("FileTypeAssociation","true")
|
||||
if ($Property_FileTypeAssociation$ = "true")
|
||||
comment "File Type Association"
|
||||
DosInAnIcon_FileTypeAssoc_install
|
||||
endif
|
||||
|
||||
Set $Property_CustomPostInstall$ = getProductProperty("custom-post-install","none")
|
||||
if not ($Property_CustomPostInstall$ = "none")
|
||||
comment "Include custom post install file"
|
||||
if FileExists("%ScriptPath%\custom\" + $Property_CustomPostInstall$)
|
||||
sub_CustomPostInstall
|
||||
else
|
||||
LogError "Include script NOT exists (" + $Property_CustomPostInstall$ +")"
|
||||
endif
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
[Winbatch_install]
|
||||
@@ -94,12 +155,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"
|
||||
@@ -129,6 +190,10 @@ copy "$IniCfgFile$" "$InstallDir$"
|
||||
; set "name3" = REG_BINARY:00 af 99 cd
|
||||
|
||||
[LinkFolder_install]
|
||||
set_basefolder common_desktopdirectory
|
||||
set_subfolder ""
|
||||
delete_element "$NAME$"
|
||||
|
||||
; Example of deleting a folder from AllUsers startmenu:
|
||||
;
|
||||
; set_basefolder common_programs
|
||||
@@ -141,7 +206,7 @@ copy "$IniCfgFile$" "$InstallDir$"
|
||||
;
|
||||
; set_link
|
||||
; name: $ProductId$
|
||||
; target: <path to the program>
|
||||
; target: $InstallDir$\$ProgramExecutable$
|
||||
; parameters:
|
||||
; working_dir: $InstallDir$
|
||||
; icon_file:
|
||||
@@ -155,13 +220,55 @@ copy "$IniCfgFile$" "$InstallDir$"
|
||||
;
|
||||
; set_link
|
||||
; name: $ProductId$
|
||||
; target: <path to the program>
|
||||
; target: $InstallDir$\$ProgramExecutable$
|
||||
; parameters: <some_param>
|
||||
; working_dir: $InstallDir$
|
||||
; icon_file: <path to icon file>
|
||||
; icon_index: 2
|
||||
; end_link
|
||||
|
||||
[LinkFolder_install_DesktopLink]
|
||||
;
|
||||
; Example of creating an shortcut to the installed exe on AllUsers desktop:
|
||||
;
|
||||
set_basefolder common_desktopdirectory
|
||||
set_subfolder ""
|
||||
;
|
||||
set_link
|
||||
name: $NAME$
|
||||
target: "$InstallDir$\$ProgramExecutable$"
|
||||
parameters:
|
||||
working_dir: $InstallDir$
|
||||
icon_file:
|
||||
icon_index:
|
||||
end_link
|
||||
|
||||
[DosInAnIcon_FileTypeAssoc_install]
|
||||
; Requires danysys.sfta
|
||||
; Sample Usage:
|
||||
; Set Acrobat Reader DC as Default .pdf reader:
|
||||
;
|
||||
; SFTA AcroExch.Document.DC .pdf
|
||||
;
|
||||
; Set Sumatra PDF as Default .pdf reader:
|
||||
;
|
||||
; SFTA Applications\SumatraPDF.exe .pdf
|
||||
|
||||
[DosInAnIcon_DisbaleUpdate]
|
||||
; Requires horstmuc.inifile
|
||||
;
|
||||
; inifile "$InstallDir$\custom.ini" [Updater] AutoUpdate=0
|
||||
|
||||
; Requires sourceforge.xmlstarlet
|
||||
;
|
||||
; Update value of an attribute
|
||||
; xml ed -u "/xml/table/rec[@id=3]/@id" -v 5 "$InstallDir$\config.xml"> "$InstallDir$\config.model.xml"
|
||||
; Update value of an element
|
||||
; xml ed -u "/xml/table/rec[@id=1]/numField" -v 0 "$InstallDir$\config.xml"> "$InstallDir$\config.model.xml"
|
||||
|
||||
[sub_CustomPostInstall]
|
||||
include_insert "%ScriptPath%\custom\" + $Property_CustomPostInstall$
|
||||
|
||||
[Sub_get_licensekey]
|
||||
if opsiLicenseManagementEnabled
|
||||
comment "License management is enabled and will be used"
|
||||
@@ -4,7 +4,8 @@
|
||||
; credits: http://www.opsi.org/en/credits/
|
||||
|
||||
[Actions]
|
||||
requiredWinstVersion >= "4.11.2.6"
|
||||
requiredWinstVersion >= "4.11.4.6"
|
||||
ScriptErrorMessages=off
|
||||
|
||||
DefVar $UninstallProgram$
|
||||
DefVar $UninstallProgramOld$
|
||||
@@ -20,7 +21,11 @@ DefVar $OLD_VERSION$
|
||||
DefVar $OLD_CREATOR_TAG$
|
||||
DefVar $OLD_RELEASE$
|
||||
|
||||
Set $LogDir$ = "%SystemDrive%\tmp"
|
||||
DefVar $Reboot$
|
||||
|
||||
DefVar $Property_FileTypeAssociation$
|
||||
|
||||
Set $LogDir$ = "%opsiLogDir%"
|
||||
|
||||
; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh
|
||||
; and adds the following variables:
|
||||
@@ -47,9 +52,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"
|
||||
Reference in New Issue
Block a user