fixed reading OPSI properties, refactoring var names
This commit is contained in:
parent
2bdb34727c
commit
f4f07fff13
@ -8,8 +8,8 @@ requiredWinstVersion >= "4.10.8.6"
|
|||||||
|
|
||||||
DefVar $wget$
|
DefVar $wget$
|
||||||
DefVar $wget_uninst$
|
DefVar $wget_uninst$
|
||||||
DefVar $Ovpn-Config-Dir$
|
DefVar $OvpnConfigDir$
|
||||||
DefVar $Konfig-URL$
|
DefVar $ConfigURL$
|
||||||
DefVar $defPW$
|
DefVar $defPW$
|
||||||
DefVar $pw$
|
DefVar $pw$
|
||||||
DefVar $MsiId$
|
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$ = 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 $wget_uninst$ = unquote($wget_uninst$,$wget_uninst$)
|
||||||
|
|
||||||
Set $Ovpn-Config-Dir$ = "%SystemDrive%\Programme\OpenVPN\config"
|
Set $OvpnConfigDir$ = "%SystemDrive%\Programme\OpenVPN\config"
|
||||||
Set $Konfig-URL$ = GetIni ("%ScriptPath%\custom\openvpn.ini" [Webserver] URL)
|
;Set $ConfigURL$ = GetIni ("%ScriptPath%\custom\openvpn.ini" [Webserver] URL)
|
||||||
Set $pw$ = GetProductProperty ("htaccess-password","values")
|
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
|
; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh
|
||||||
; and adds the following variables:
|
; and adds the following variables:
|
||||||
@ -108,15 +109,16 @@ endif
|
|||||||
"$Wget32Exe$" /Silent
|
"$Wget32Exe$" /Silent
|
||||||
;Set $wget_uninst$ = GetRegistrystringvalue("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Wget-1.11.4-1_is1] UninstallString")
|
;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 $wget_uninst$ = unquote($wget_uninst$,$wget_uninst$)
|
||||||
|
|
||||||
"%ScriptPath%\reghack.vbs"
|
"%ScriptPath%\reghack.vbs"
|
||||||
"%ScriptPath%\reghack2.vbs"
|
"%ScriptPath%\reghack2.vbs"
|
||||||
"%ScriptPath%\reg_ndiwswan_bind.vbs"
|
"%ScriptPath%\reg_ndiwswan_bind.vbs"
|
||||||
"%Scriptpath%\enable_rdp.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 $OvpnConfigDir$ /E /R Benutzer
|
||||||
cacls $Ovpn-Config-Dir$ /E /R Hauptbenutzer
|
cacls $OvpnConfigDir$ /E /R Hauptbenutzer
|
||||||
|
|
||||||
sc config OpenVPNService start= auto
|
sc config OpenVPNService start= auto
|
||||||
netsh firewall set opmode mode=disable interface="LAN-Verbindung OpenVPN"
|
netsh firewall set opmode mode=disable interface="LAN-Verbindung OpenVPN"
|
||||||
|
Loading…
Reference in New Issue
Block a user