BigDaddyO 63 Posted August 11, 2010 I have this script that will set static IP settings for a NIC which works fine. Except when running it on a French Canadian computer. It seems to go thorugh fine, i get no errors, but it does not set the Static information. Does anyone have an idea what might be causing the problem? $oWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") $oNetAdapters = $oWMIService.ExecQuery("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=True") Dim $sIPAddress[1] = ["192.168.0.4"] Dim $sSubnetMask[1] = ["255.255.255.0"] Dim $sGateWay[1] = ["192.168.0.1"] Dim $aDNS[2] = ["192.168.10.239", "192.168.10.239"] For $objNetAdapters in $oNetAdapters $iSetStatic = $objNetAdapters.EnableStatic($sIPAddress, $sSubnetMask) $iSetGateway = $objNetAdapters.SetGateways($sGateWay) $iSetDNS = $objNetAdapters.SetDNSServerSearchOrder($aDNS) MsgBox(0, "", "Settings now set for NIC with MAC of: " & $objNetAdapters.MACAddress & @CRLF & "SettingID" & $objNetAdapters.SettingID) RegWrite("HKLM\SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\" & $objNetAdapters.SettingID & "\Connection", "ShowIcon", "REG_DWORD", 1) RegWrite("HKLM\SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\" & $objNetAdapters.SettingID & "\Connection", "Name", "REG_SZ", "Test Name") ExitLoop Next Thanks, Mike hmm... I guess I have to have a signature... Share this post Link to post Share on other sites
Bert 1,430 Posted August 11, 2010 um, it may be for the language is in French on those PCs, thus the keys you are writing to need to be written in French so it reflects how those PCs are setup. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Share this post Link to post Share on other sites