update to new opsi builder template

This commit is contained in:
Mario Fetka 2013-03-20 15:55:37 +01:00
parent b20d5d990c
commit b748fb8be1
18 changed files with 456 additions and 397 deletions

View File

@ -1,51 +0,0 @@
; 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/
Set $UninstallProgram$ = $InstallDir$ + "\uninstall.exe"
Message "Uninstalling " + $ProductId$ + " ..."
if FileExists($UninstallProgram$)
comment "Uninstall program found, starting uninstall"
Winbatch_uninstall
sub_check_exitcode
endif
[Winbatch_uninstall]
; Choose one of the following examples as basis for program uninstall
;
; === Nullsoft Scriptable Install System ================================================================
"$UninstallProgram$" /S
[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

141
CLIENT_DATA/delsub3264.ins Normal file
View File

@ -0,0 +1,141 @@
; 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 $UninstallProgram32$ = $InstallDir32$ + "\" + $UninstallProg32$
Set $IniFile32$ = $InstallDir32$ + "\opsi-" + $ProductId$ + ".ini"
Set $UninstallProgram64$ = $InstallDir64$ + "\" + $UninstallProg64$
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..."
if FileExists($IniFile32$)
Set $UninstallProg32$ = GetValueFromInifile($IniFile32$,"X86","UninstallProg32","XXXXXXXX.exe")
Set $UninstallProgramOld32$ = $InstallDir32$ + "\" + $UninstallProg32$
if FileExists($UninstallProgramOld32$)
comment "Uninstall program found, starting uninstall"
Winbatch_uninstall_old_32
sub_check_exitcode
endif
endif
if FileExists($UninstallProgram32$)
comment "Uninstall program found, starting uninstall"
Winbatch_uninstall_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"))
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..."
if FileExists($IniFile64$)
Set $UninstallProg64$ = GetValueFromInifile($IniFile64$,"X86_64","UninstallProg64","XXXXXXXX.exe")
Set $UninstallProgramOld64$ = $InstallDir64$ + "\" + $UninstallProg64$
if FileExists($UninstallProgramOld64$)
comment "Uninstall program found, starting uninstall"
Winbatch_uninstall_old_64
sub_check_exitcode
endif
endif
if FileExists($UninstallProgram64$)
comment "Uninstall program found, starting uninstall"
Winbatch_uninstall_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_old_32]
"$UninstallProgramOld32$" /S
[Winbatch_uninstall_32]
"$UninstallProgram32$" /S
[Files_uninstall_32]
; Example for recursively deleting the installation directory (don't forget the trailing backslash):
;
delete -sf "$InstallDir32$\"
[Winbatch_uninstall_old_64]
"$UninstallProgramOld64$" /S
[Winbatch_uninstall_64]
"$UninstallProgram64$" /S
[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

24
CLIENT_DATA/login.ins Normal file
View 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"

View File

@ -0,0 +1,7 @@
[X86]
[X86_64]
[COMMON]
PN=name
VERSION=version

View File

@ -1,38 +0,0 @@
Main()
Sub Main()
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = "SYSTEM\CurrentControlSet\Services\Tcpip\Linkage"
strValueName = "Bind"
oReg.GetMultiStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, arrValues
Dim colNewVals
Set colNewVals = CreateObject("Scripting.Dictionary")
flag = false
For Each strValue In arrValues
If strValue = "\Device\NdisWanIp" Then
colNewVals.Add 0, strValue
flag = true
Exit For
End If
Next
If flag = false Then
Exit Sub
End If
i = 1
For Each strValue In arrValues
If strValue <> "\Device\NdisWanIp" Then
colNewVals.Add i, strValue
i = i + 1
End If
Next
oReg.SetMultiStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName,colNewVals.Items
End Sub

View File

@ -1,27 +0,0 @@
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
strKeyPath = "SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}"
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
strValueName = "DriverDesc"
For Each subkey In arrSubKeys
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath&"\"&subkey,strValueName,strValue
if strValue = "TAP-Win32 Adapter V9" Then
strValueName2 = "MTU"
strValue2 = "1400"
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath&"\"&subkey,strValueName2,strValue2
strValueName3 = "NetCfgInstanceId"
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath&"\"&subkey,strValueName3,strValue3
strKeyPath2 = "SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002bE10318}\"&strValue3&"\Connection"
strValueName4 = "Name"
strValue3 = "LAN-Verbindung OpenVPN"
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath2,strValueName4,strValue3
end if
Next

View File

@ -1,37 +0,0 @@
On Error Resume Next
Const HKEY_LOCAL_MACHINE = &H80000002
'Const FULL_DNS_REGISTRATION = True
'Const DOMAIN_DNS_REGISTRATION = False
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
strKeyPath = "SYSTEM\CurrentControlSet\Services\Tcpip\Parameters"
strValueName = "SearchList"
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colNetCards = objWMIService.ExecQuery _
("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True")
For Each objNetCard in colNetCards
if objNetCard.Description = "TAP-Win32 Adapter V9" then
objNetCard.SetDynamicDNSRegistration True, _
False
objNetCard.SetTcpipNetbios 0
else
objNetCard.SetDynamicDNSRegistration False, _
False
objNetCard.SetTcpipNetbios 2
end if
Next
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
if strValue <> "" then
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,""
end if

View File

@ -1,151 +0,0 @@
; 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.10.8.6"
DefVar $wget$
DefVar $wget_uninst$
DefVar $Ovpn-Config-Dir$
DefVar $Konfig-URL$
DefVar $pw$
DefVar $MsiId$
DefVar $UninstallProgram$
DefVar $LogDir$
DefVar $ProductId$
DefVar $MinimumSpace$
DefVar $InstallDir$
DefVar $ExitCode$
DefVar $LicenseRequired$
DefVar $LicenseKey$
DefVar $LicensePool$
Set $LogDir$ = "%SystemDrive%\tmp"
;Set $wget$ = "%SystemDrive%\Programme\GnuWin32\bin\wget.exe"
;Set $wget_uninst$ = GetRegistrystringvalue("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Wget-1.11.4-1_is1] UninstallString")
;Set $wget_uninst$ = unquote($wget_uninst$,$wget_uninst$)
;Set $Ovpn-Config-Dir$ = "%SystemDrive%\Programme\OpenVPN\config"
;Set $Konfig-URL$ = GetIni ("%ScriptPath%\url.ini" [Webserver] URL)
;Set $pw$ = GetProductProperty ("apache-pw","values")
; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh
; and adds the following variables:
; from builder-product.cfg : all variables definded by attribute WINST[index]
; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE
; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL
; auto generated winst-variables
; $IconFile$: path to product picture
;
@@BUILDER_VARIABLES@@
; ----------------------------------------------------------------
; - 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$ = "openvpn"
Set $MinimumSpace$ = "1 MB"
; the path were we find the product after the installation
Set $InstallDir$ = "%ProgramFiles32Dir%\OpenVPN"
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$
Message "Installing " + $ProductId$ + " ..."
if $LicenseRequired$ = "true"
comment "Licensing required, reserve license and get license key"
Sub_get_licensekey
endif
comment "Start setup program"
Winbatch_install
Sub_check_exitcode
; comment "Patch Registry"
; Registry_install /32Bit
; comment "Default-User in Registry"
; Registry_AllUsers /AllNTUserdats
comment "Shortcuts"
LinkFolder_install
comment "Test for installation success"
; Test if software marked as installed in registry
; if (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}] DisplayName") = "")
; logError "Fatal: After Installation 32 bit [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}] not found"
; isFatalError
; else
; comment "Successful Installation"
; endif
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 ================================================================
"$Driversigning32Exe$" -OFF
"$Install32Exe$" /S
"$Driversigning32Exe$" -OFF
;"$Wget32Exe$" /Silent
;Set $wget_uninst$ = GetRegistrystringvalue("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Wget-1.11.4-1_is1] UninstallString")
;Set $wget_uninst$ = unquote($wget_uninst$,$wget_uninst$)
;"%ScriptPath%\reghack.vbs"
;"%ScriptPath%\reghack2.vbs"
;"%ScriptPath%\reg_ndiwswan_bind.vbs"
;$wget$ -O $Ovpn-Config-Dir$\ca.crt --http-user=%PCName% --password=$pw$ $Konfig-URL$/%PCName%/ca.crt
;$wget$ -O $Ovpn-Config-Dir$\client.crt --http-user=%PCName% --password=$pw$ $Konfig-URL$/%PCName%/client.crt
;$wget$ -O $Ovpn-Config-Dir$\client.key --http-user=%PCName% --password=$pw$ $Konfig-URL$/%PCName%/client.key
;$wget$ -O $Ovpn-Config-Dir$\client.ovpn --http-user=%PCName% --password=$pw$ $Konfig-URL$/%PCName%/client.ovpn
;$wget$ -O $Ovpn-Config-Dir$\ta.key --http-user=%PCName% --password=$pw$ $Konfig-URL$/%PCName%/ta.key
;cacls $Ovpn-Config-Dir$ /E /R Benutzer
;cacls $Ovpn-Config-Dir$ /E /R Hauptbenutzer
;sc config OpenVPNService start= auto
;netsh firewall set opmode mode=disable interface="LAN-Verbindung OpenVPN"
;$wget_uninst$ /silent
[Registry_install]
;openkey [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server]
;set "fDenyTSConnections" = REG_DWORD:0000
;openkey [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\Kerberos\Parameters]
;set "MaxPacketSize"=reg_dword:01
;openkey [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
;set "GpNetworkStartTimeoutPolicyValue"=reg_dword:60
;set "GroupPolicyMinTransferRate"=reg_dword:00
;openkey [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System]
;set "GpNetworkStartTimeoutPolicyValue"=reg_dword:60
;set "GroupPolicyMinTransferRate"=reg_dword:00
[Registry_AllUsers]
;openkey [SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
;set "GpNetworkStartTimeoutPolicyValue"=reg_dword:60
;set "GroupPolicyMinTransferRate"=reg_dword:00
[LinkFolder_install]
set_basefolder common_desktopdirectory
set_subfolder ""
delete_element "OpenVPN GUI"

194
CLIENT_DATA/setup3264.ins Normal file
View File

@ -0,0 +1,194 @@
; 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.2.6"
DefVar $UninstallProgram32$
DefVar $UninstallProgramOld32$
DefVar $IniFile32$
DefVar $UninstallProgram64$
DefVar $UninstallProgramOld64$
DefVar $IniFile64$
DefVar $IniCfgFile$
DefVar $LogDir$
DefVar $ProductId$
DefVar $MinimumSpace$
DefVar $InstallDir32$
DefVar $InstallDir64$
DefVar $ExitCode$
DefVar $INST_SystemType$
DefVar $INST_architecture$
DefVar $OLD_VERSION$
DefVar $OLD_CREATOR_TAG$
DefVar $OLD_RELEASE$
Set $INST_SystemType$ = GetSystemType
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
Set $LogDir$ = "%SystemDrive%\tmp"
; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh
; and adds the following variables:
; from builder-product.cfg : all variables definded by attribute WINST[index]
; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE
; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL
; auto generated winst-variables
; $IconFile$: path to product picture
;
@@BUILDER_VARIABLES@@
; ----------------------------------------------------------------
; - 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 $MinimumSpace$ = "30 MB"
; the path were we find the product after the installation
Set $InstallDir32$ = "%ProgramFiles32Dir%\OpenVPN"
Set $InstallDir64$ = "%ProgramFiles64Dir%\OpenVPN"
; ----------------------------------------------------------------
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"
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" $NAME$
if FileExists("%ScriptPath%\delsub3264.ins")
comment "Start uninstall sub section"
Sub "%ScriptPath%\delsub3264.ins"
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$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 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$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 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]
"$Install32Exe$" /S
[Files_install_32]
; copy the ini file to the InstallDir
copy "$IniCfgFile$" "$InstallDir32$"
; Example of recursively copying some files into the installation directory:
;
; copy -s "%ScriptPath%\files\*.*" "$InstallDir32$"
[Winbatch_install_64]
"$Install64Exe$" /S
[Files_install_64]
; copy the ini file to the InstallDir
copy "$IniCfgFile$" "$InstallDir64$"
; 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: <path to the program>
; 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: <path to the program>
; parameters: <some_param>
; working_dir: $InstallDir$
; icon_file: <path to icon file>
; icon_index: 2
; end_link
[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

View File

@ -1,68 +0,0 @@
; 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.10.8.6"
DefVar $MsiId$
DefVar $UninstallProgram$
DefVar $LogDir$
DefVar $ExitCode$
DefVar $ProductId$
DefVar $InstallDir$
DefVar $LicenseRequired$
DefVar $LicensePool$
Set $LogDir$ = "%SystemDrive%\tmp"
; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh
; and adds the following variables:
; from builder-product.cfg : all variables definded by attribute WINST[index]
; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE
; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL
; auto generated winst-variables
; $IconFile$: path to product picture
;
@@BUILDER_VARIABLES@@
; ----------------------------------------------------------------
; - Please edit the following values -
; ----------------------------------------------------------------
Set $ProductId$ = "opsi-template"
Set $InstallDir$ = "%ProgramFiles32Dir%\OpenVPN"
Set $LicenseRequired$ = "false"
Set $LicensePool$ = "p_" + $ProductId$
; ----------------------------------------------------------------
comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
Message "Uninstalling " + $ProductId$ + " ..."
if FileExists("%ScriptPath%\delsub32.ins")
comment "Start uninstall sub section"
Sub "%ScriptPath%\delsub32.ins"
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$)

View File

@ -0,0 +1,62 @@
; 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.2.6"
DefVar $UninstallProg32$
DefVar $UninstallProgram32$
DefVar $UninstallProgramOld32$
DefVar $IniFile32$
DefVar $UninstallProg64$
DefVar $UninstallProgram64$
DefVar $UninstallProgramOld64$
DefVar $IniFile64$
DefVar $IniCfgFile$
DefVar $LogDir$
DefVar $ExitCode$
DefVar $ProductId$
DefVar $InstallDir32$
DefVar $InstallDir64$
DefVar $INST_SystemType$
DefVar $INST_architecture$
DefVar $OLD_VERSION$
DefVar $OLD_CREATOR_TAG$
DefVar $OLD_RELEASE$
Set $INST_SystemType$ = GetSystemType
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
Set $LogDir$ = "%SystemDrive%\tmp"
; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh
; and adds the following variables:
; from builder-product.cfg : all variables definded by attribute WINST[index]
; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE
; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL
; auto generated winst-variables
; $IconFile$: path to product picture
;
@@BUILDER_VARIABLES@@
; ----------------------------------------------------------------
; - Please edit the following values -
; ----------------------------------------------------------------
Set $InstallDir32$ = "%ProgramFiles32Dir%\OpenVPN"
Set $InstallDir64$ = "%ProgramFiles64Dir%\OpenVPN"
; ----------------------------------------------------------------
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"
comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$
Message "Uninstalling " + $ProductId$ + " ..."
if FileExists("%ScriptPath%\delsub3264.ins")
comment "Start uninstall sub section"
Sub "%ScriptPath%\delsub3264.ins"
endif

View File

@ -13,8 +13,8 @@ version: VERSION
priority: PRIORITY
licenseRequired: False
productClasses:
setupScript: setup32.ins
uninstallScript: uninstall32.ins
setupScript: setup3264.ins
uninstallScript: uninstall3264.ins
updateScript:
alwaysScript:
onceScript:
@ -30,11 +30,3 @@ description: which architecture (32/64 bit) has to be installed
values: ["32 only", "64 only", "both", "system specific"]
default: ["system specific"]
;[ProductProperty]
;type: unicode
;name: apache-pw
;multivalue: False
;editable: True
;description: Passwort fuer Download der Konfigfiles
;values: ["Passwort"]
;default: ["Passwort"]

View File

@ -3,7 +3,9 @@
############################
VENDOR="openvpn.org"
PN="openvpn.openvpn"
VERSION="2.2.2"
NAME="OpenVPN Client"
DESCRIPTION="OpenVPN ist ein Programm zum Aufbau eines Virtuellen Privaten Netzwerkes (VPN) ueber eine verschluesselte TLS-Verbindung."
VERSION="2.3.0"
RELEASE="1"
PRIORITY="0"
ADVICE=""
@ -13,22 +15,31 @@ ADVICE=""
TYPE="public"
DL_FILE[0]="openvpn.png"
DL_SOURCE[0]="http://www.bitblokes.de/wp-content/uploads/2010/10/openvpn-logo-150x150.png"
DL_SOURCE[0]="http://remibergsma.files.wordpress.com/2015/02/openvpn.png"
DL_FILE[1]="openvpn32.exe"
DL_SOURCE[1]="http://swupdate.openvpn.org/community/releases/openvpn-2.2.2-install.exe"
DL_FILE[1]="openvpn-install-${VERSION}-i686.exe"
DL_SOURCE[1]="http://swupdate.openvpn.org/community/releases/openvpn-install-${VERSION}-I005-i686.exe"
DL_ARCH[1]="X86"
DL_WINST_NAME[1]=Install32Exe
DL_FILE[2]="Driversigning.exe"
DL_SOURCE[2]="http://nativeex.boot-land.net/Programs/DriverSigning/DriverSigning.exe"
DL_ARCH[2]="X86"
DL_WINST_NAME[2]=Driversigning32Exe
DL_FILE[2]="openvpn-install-${VERSION}-x86_64.exe"
DL_SOURCE[2]="http://swupdate.openvpn.org/community/releases/openvpn-install-${VERSION}-I005-x86_64.exe"
DL_ARCH[2]="X86_64"
DL_WINST_NAME[2]=Install64Exe
;DL_FILE[3]="wget.exe"
;DL_SOURCE[3]="http://downloads.sourceforge.net/project/gnuwin32/wget/1.11.4-1/wget-1.11.4-1-setup.exe?r=&ts=1333400082&use_mirror=garr"
;DL_ARCH[3]="X86"
;DL_WINST_NAME[3]=Wget32exe
DL_FILE[3]="Driversigning.exe"
DL_SOURCE[3]="http://nativeex.boot-land.net/Programs/DriverSigning/DriverSigning.exe"
DL_ARCH[3]="X86"
DL_WINST_NAME[3]=Driversigning32Exe
# File array index for the image showing while installing the program
ICON_DL_INDEX=0
OPSI_INI_SECTION[0]="X86"
OPSI_INI_OPTION[0]="UninstallProg32"
OPSI_INI_VALUE[0]="Uninstall.exe"
OPSI_INI_SECTION[1]="X86_64"
OPSI_INI_OPTION[1]="UninstallProg64"
OPSI_INI_VALUE[1]="Uninstall.exe"

View File

@ -0,0 +1 @@
b1b9427fad3daf2ad08cabf9704877aa9daea021 /home/mario/.opsi-dist-cache/openvpn.openvpn-2.3.0/X86/openvpn-install-2.3.0-i686.exe

View File

@ -0,0 +1 @@
39b2b696ebe5cda1eae147de52ec1fd8ade7b4c2 /home/mario/.opsi-dist-cache/openvpn.openvpn-2.3.0/X86_64/openvpn-install-2.3.0-x86_64.exe

View File

@ -1 +1 @@
1e55e6d56fd54b044fedb5863e1693e812b776fe /home/dtrinks/.opsi-dist-cache/openvpn.org/openvpn/2.2.2//openvpn.png
8b4cd710cd4512663fb6e67ba6e14b5b14efe291 /home/mario/.opsi-dist-cache/openvpn.openvpn-2.3.0//openvpn.png

View File

@ -1 +0,0 @@
395a31bfa3e9991d31d0350842e3a8ff710e20a3 /home/dtrinks/.opsi-dist-cache/openvpn.org/openvpn/2.2.2/X86/openvpn32.exe

View File

@ -1 +0,0 @@
35e3ecc99c5a28745f957e87695b5a18b1f61680 /home/dtrinks/.opsi-dist-cache/openvpn.org/openvpn/2.2.2/X86/wget.exe