Bugfixing

This commit is contained in:
Dennis Trinks 2012-04-10 14:58:23 +02:00
parent 2b945b80aa
commit eeae2523ea
4 changed files with 27 additions and 22 deletions

View File

@ -1,27 +1,35 @@
Const HKEY_LOCAL_MACHINE = &H80000002 Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "." strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _ Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv") strComputer & "\root\default:StdRegProv")
Set oReg2=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
strKeyPath = "SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}" strKeyPath = "SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}"
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
strValueName = "DriverDesc" strValueName = "DriverDesc"
For Each subkey In arrSubKeys For Each subkey In arrSubKeys
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath&"\"&subkey,strValueName,strValue oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath&"\"&subkey,strValueName,strValue
if strValue = "TAP-Win32 Adapter V9" Then if strValue = "TAP-Win32 Adapter V9" Then
strValueName2 = "MTU" strValueName2 = "MTU"
strValue2 = "1400" strValue2 = "1400"
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath&"\"&subkey,strValueName2,strValue2 oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath&"\"&subkey,strValueName2,strValue2
strValueName3 = "NetCfgInstanceId"
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath&"\"&subkey,strValueName3,strValue3
strKeyPath2 = "SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002bE10318}\"&strValue3&"\Connection" strValueName3 = "NetCfgInstanceId"
strValueName4 = "Name" oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath&"\"&subkey,strValueName3,strValue3
strValue3 = "LAN-Verbindung OpenVPN"
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath2,strValueName4,strValue3 strKeyPath2 = "SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002bE10318}\"&strValue3&"\Connection"
end if 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 Next

View File

@ -29,9 +29,9 @@ Set $wget$ = "%SystemDrive%\Programme\GnuWin32\bin\wget.exe"
;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 $Ovpn-Config-Dir$ = "%SystemDrive%\Programme\OpenVPN\config"
Set $Konfig-URL$ = GetIni ("%ScriptPath%\url.ini" [Webserver] URL) Set $Konfig-URL$ = GetIni ("%ScriptPath%\custom\openvpn.ini" [Webserver] URL)
Set $defPW$ = GetIni ("%ScriptPath%\url.ini" [Webserver] defPW) Set $defPW$ = GetIni ("%ScriptPath%\custom\openvpn.ini" [Webserver] defPW)
Set $pw$ = GetProductProperty ("apache-pw","values") Set $pw$ = GetProductProperty ("webserver-password","values")
; 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:

View File

@ -1,3 +0,0 @@
[Webserver]
URL = "http://opsi-dev.dtnet.de/opsi/openvpn"
defPW = "sECureIT"

View File

@ -38,9 +38,9 @@ requirementType: before
[ProductProperty] [ProductProperty]
type: unicode type: unicode
name: apache-pw name: webserver-password
multivalue: False multivalue: False
editable: True editable: True
description: Passwort fuer Download der Konfigfiles description: Password for downloading configfiles
values: [""] values: [""]
default: [""] default: [""]