From f4f07fff13d49557c75a522acd8c14917066ddc1 Mon Sep 17 00:00:00 2001 From: DT Netsolution GmbH Date: Fri, 27 Apr 2012 16:00:06 +0200 Subject: [PATCH] fixed reading OPSI properties, refactoring var names --- CLIENT_DATA/setup32.ins | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/CLIENT_DATA/setup32.ins b/CLIENT_DATA/setup32.ins index 9097fd7..9649d5b 100644 --- a/CLIENT_DATA/setup32.ins +++ b/CLIENT_DATA/setup32.ins @@ -8,8 +8,8 @@ requiredWinstVersion >= "4.10.8.6" DefVar $wget$ DefVar $wget_uninst$ -DefVar $Ovpn-Config-Dir$ -DefVar $Konfig-URL$ +DefVar $OvpnConfigDir$ +DefVar $ConfigURL$ DefVar $defPW$ DefVar $pw$ DefVar $MsiId$ @@ -28,9 +28,10 @@ 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%\custom\openvpn.ini" [Webserver] URL) -Set $pw$ = GetProductProperty ("htaccess-password","values") +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") ; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh ; and adds the following variables: @@ -108,15 +109,16 @@ endif "$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" "%Scriptpath%\enable_rdp.vbs" -$wget$ -P $Ovpn-Config-Dir$ --http-user=%PCName% --password=$pw$ -r -R "index.html*" -nd -nH -np $Konfig-URL$/%PCName% +$wget$ -P $OvpnConfigDir$ --http-user=%PCName% --password=$pw$ -r -R "index.html*" -nd -nH -np $ConfigURL$/%PCName% -cacls $Ovpn-Config-Dir$ /E /R Benutzer -cacls $Ovpn-Config-Dir$ /E /R Hauptbenutzer +cacls $OvpnConfigDir$ /E /R Benutzer +cacls $OvpnConfigDir$ /E /R Hauptbenutzer sc config OpenVPNService start= auto netsh firewall set opmode mode=disable interface="LAN-Verbindung OpenVPN"