From eeae2523ea55488a093dd8bf2351e0239855b980 Mon Sep 17 00:00:00 2001 From: Dennis Trinks Date: Tue, 10 Apr 2012 14:58:23 +0200 Subject: [PATCH] Bugfixing --- CLIENT_DATA/reghack.vbs | 36 ++++++++++++++++++++++-------------- CLIENT_DATA/setup32.ins | 6 +++--- CLIENT_DATA/url.ini | 3 --- OPSI/control | 4 ++-- 4 files changed, 27 insertions(+), 22 deletions(-) delete mode 100644 CLIENT_DATA/url.ini diff --git a/CLIENT_DATA/reghack.vbs b/CLIENT_DATA/reghack.vbs index 18fa5af..44533b5 100644 --- a/CLIENT_DATA/reghack.vbs +++ b/CLIENT_DATA/reghack.vbs @@ -1,27 +1,35 @@ Const HKEY_LOCAL_MACHINE = &H80000002 strComputer = "." - -Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _ + +Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _ strComputer & "\root\default:StdRegProv") - + +Set oReg2=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 + strValue2 = "1400" + oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath&"\"&subkey,strValueName2,strValue2 - 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 + strValueName3 = "NetCfgInstanceId" + oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath&"\"&subkey,strValueName3,strValue3 + + strKeyPath2 = "SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002bE10318}\"&strValue3&"\Connection" + If oReg2.EnumKey(HKEY_LOCAL_MACHINE,strKeyPath2,arrSubKeys2) <> 0 Then + oReg2.CreateKey HKEY_LOCAL_MACHINE,strKeyPath2 + oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath2,"PnpInstanceID","ROOT\NET\0000" + oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath2,"MediaSubType",1 + end if + strValueName4 = "Name" + strValue3 = "LAN-Verbindung OpenVPN" + oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath2,strValueName4,strValue3 + end if Next \ No newline at end of file diff --git a/CLIENT_DATA/setup32.ins b/CLIENT_DATA/setup32.ins index 8c0e4d3..e25cdd4 100644 --- a/CLIENT_DATA/setup32.ins +++ b/CLIENT_DATA/setup32.ins @@ -29,9 +29,9 @@ Set $wget$ = "%SystemDrive%\Programme\GnuWin32\bin\wget.exe" ;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 $defPW$ = GetIni ("%ScriptPath%\url.ini" [Webserver] defPW) -Set $pw$ = GetProductProperty ("apache-pw","values") +Set $Konfig-URL$ = GetIni ("%ScriptPath%\custom\openvpn.ini" [Webserver] URL) +Set $defPW$ = GetIni ("%ScriptPath%\custom\openvpn.ini" [Webserver] defPW) +Set $pw$ = GetProductProperty ("webserver-password","values") ; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh ; and adds the following variables: diff --git a/CLIENT_DATA/url.ini b/CLIENT_DATA/url.ini deleted file mode 100644 index dfae284..0000000 --- a/CLIENT_DATA/url.ini +++ /dev/null @@ -1,3 +0,0 @@ -[Webserver] -URL = "http://opsi-dev.dtnet.de/opsi/openvpn" -defPW = "sECureIT" \ No newline at end of file diff --git a/OPSI/control b/OPSI/control index 748678b..44d9c83 100644 --- a/OPSI/control +++ b/OPSI/control @@ -38,9 +38,9 @@ requirementType: before [ProductProperty] type: unicode -name: apache-pw +name: webserver-password multivalue: False editable: True -description: Passwort fuer Download der Konfigfiles +description: Password for downloading configfiles values: [""] default: [""] \ No newline at end of file