2012-04-05 15:03:00 +02:00
|
|
|
; 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"
|
|
|
|
|
2012-04-12 20:37:44 +02:00
|
|
|
DefVar $domainname$
|
2012-04-05 15:03:00 +02:00
|
|
|
DefVar $joinadmin$
|
|
|
|
DefVar $joinadminpw$
|
2012-04-12 20:37:44 +02:00
|
|
|
DefVar $localadminpw$
|
2012-04-05 15:03:00 +02:00
|
|
|
DefVar $joinstr$
|
|
|
|
DefVar $MsiId$
|
|
|
|
DefVar $UninstallProgram$
|
|
|
|
DefVar $LogDir$
|
|
|
|
DefVar $ProductId$
|
|
|
|
DefVar $MinimumSpace$
|
|
|
|
DefVar $InstallDir$
|
|
|
|
DefVar $ExitCode$
|
|
|
|
DefVar $LicenseRequired$
|
|
|
|
DefVar $LicenseKey$
|
|
|
|
DefVar $LicensePool$
|
|
|
|
|
|
|
|
Set $LogDir$ = "%SystemDrive%\tmp"
|
2012-04-12 20:37:44 +02:00
|
|
|
Set $domainname$ = GetProductProperty ("domainname","values")
|
2012-04-05 15:03:00 +02:00
|
|
|
Set $joinadmin$ = GetProductProperty ("joinadmin","values")
|
|
|
|
Set $joinadminpw$ = GetProductProperty ("joinadminpw","values")
|
2012-04-12 20:37:44 +02:00
|
|
|
Set $joinstr$ = "JOIN %PCName% /Domain:" + $domainname$ + " /UserD:" + $joinadmin$ + " /PasswordD:" + $joinadminpw$
|
|
|
|
Set $localadminpw$ = GetProductProperty ("localadminpw","values")
|
2012-04-05 15:03:00 +02:00
|
|
|
|
|
|
|
; 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$ = "joindomain"
|
|
|
|
Set $MinimumSpace$ = "1 MB"
|
|
|
|
; the path were we find the product after the installation
|
|
|
|
Set $InstallDir$ = "%ProgramFiles32Dir%\<path to the product>"
|
|
|
|
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%\delsub32.ins")
|
|
|
|
comment "Start uninstall sub section"
|
|
|
|
Sub "%ScriptPath%\delsub32.ins"
|
|
|
|
endif
|
|
|
|
|
|
|
|
Message "Installing " + $ProductId$ + " ..."
|
|
|
|
|
|
|
|
if $LicenseRequired$ = "true"
|
|
|
|
comment "Licensing required, reserve license and get license key"
|
|
|
|
Sub_get_licensekey
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
comment "Copy files"
|
|
|
|
Files_install
|
|
|
|
|
|
|
|
comment "Start setup program"
|
|
|
|
Winbatch_install
|
|
|
|
Sub_check_exitcode
|
|
|
|
|
|
|
|
comment "Reboot"
|
|
|
|
ExitWindows /Reboot
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
[Files_install]
|
2012-04-23 22:55:28 +02:00
|
|
|
copy "%ScriptPath%\netdom.exe" %System%
|
2012-04-05 15:03:00 +02:00
|
|
|
|
|
|
|
[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 ================================================================
|
|
|
|
|
2012-04-12 20:37:44 +02:00
|
|
|
net user Administrator $localadminpw$
|
2012-04-05 15:03:00 +02:00
|
|
|
netdom.exe $joinstr$
|
|
|
|
|