adding 2nd ip/netmask on primary adapter using set_2nd_ip.vbs

This commit is contained in:
Dennis Trinks
2012-05-07 19:50:08 +02:00
parent f4f07fff13
commit 2e59c8d317
2 changed files with 48 additions and 6 deletions

View File

@@ -12,6 +12,8 @@ DefVar $OvpnConfigDir$
DefVar $ConfigURL$
DefVar $defPW$
DefVar $pw$
DefVar $local_ip_addr2$
DefVar $local_netmask2$
DefVar $MsiId$
DefVar $UninstallProgram$
DefVar $LogDir$
@@ -32,7 +34,11 @@ Set $OvpnConfigDir$ = "%SystemDrive%\Programme\OpenVPN\config"
;Set $ConfigURL$ = GetIni ("%ScriptPath%\custom\openvpn.ini" [Webserver] URL)
Set $ConfigURL$ = GetProductProperty ("base-url","http://default-url.de/opsi/openvpn")
Set $pw$ = GetProductProperty ("htaccess-password","SecRet")
Set $local_ip_addr2$ = GetProductProperty("local-addr2.ip","values")
if not ($local_ip_addr2$ = "")
Set $local_netmask2$ = GetProductProperty("local-addr2.netmask","values")
endif
; 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]
@@ -77,6 +83,9 @@ else
Sub_get_licensekey
endif
comment "Copy files"
Files_install /32Bit
comment "Start setup program"
Winbatch_install
Sub_check_exitcode
@@ -101,6 +110,13 @@ else
endif
[Files_install]
copy "%ScriptPath%\reghack.vbs" %SystemDrive%\tmp\
copy "%ScriptPath%\reghack2.vbs" %SystemDrive%\tmp\
copy "%ScriptPath%\reg_ndiwswan_bind.vbs" %SystemDrive%\tmp\
copy "%ScriptPath%\enable_rdp.vbs" %SystemDrive%\tmp\
copy "%ScriptPath%\set_2nd_ip.vbs" %SystemDrive%\tmp\
[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
@@ -110,10 +126,16 @@ endif
;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"
"%Scriptpath%\enable_rdp.vbs"
"%SystemDrive%\tmp\reghack.vbs"
"%SystemDrive%\tmp\reghack2.vbs"
"%SystemDrive%\tmp\reg_ndiwswan_bind.vbs"
"%SystemDrive%\tmp\enable_rdp.vbs"
;"%ScriptPath%\reghack.vbs"
;"%ScriptPath%\reghack2.vbs"
;"%ScriptPath%\reg_ndiwswan_bind.vbs"
;"%Scriptpath%\enable_rdp.vbs"
$wget$ -P $OvpnConfigDir$ --http-user=%PCName% --password=$pw$ -r -R "index.html*" -nd -nH -np $ConfigURL$/%PCName%
@@ -124,6 +146,8 @@ sc config OpenVPNService start= auto
netsh firewall set opmode mode=disable interface="LAN-Verbindung OpenVPN"
netsh firewall set service type=remotedesktop mode=enable scope=all
%ScriptPath%\set_2nd_ip.vbs $local_ip_addr2$ $local_netmask2$
;$wget_uninst$ /silent
[Registry_install]