TimBS Posted March 28, 2004 Share Posted March 28, 2004 Can Anyone help I still need some help changing the IP address on a local PC The code I have used for IP example of 66.33.4.60 on a WinNT machine is RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\E100B6\Parameters\Tcpip", "IPAddress","REG_BINARY","336362E33332E342E3630") The registry looks right but when I look at the IP under the network protocol the previous IP has been overwritten with spaces. I would also like to do this job on Win 95,98 and 2000 PCs Thanks Link to comment Share on other sites More sharing options...
MattNis Posted March 29, 2004 Share Posted March 29, 2004 look into using netsh on win2k [quote]I was busy waiting all night for the Columbus Day Bunny to come down my chimney and light fireworks in my pumpkin.There's so much wrong with that.Oh, I'm sorry, i forgot you were Jewish.[/quote] Link to comment Share on other sites More sharing options...
TimBS Posted March 31, 2004 Author Share Posted March 31, 2004 Thanks for your help, but I am not familiar with netsh. Can you give me some extra help on the command I would use Link to comment Share on other sites More sharing options...
CyberSlug Posted March 31, 2004 Share Posted March 31, 2004 Look herehope it helps Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
TimBS Posted April 1, 2004 Author Share Posted April 1, 2004 Thanks for the help with netsh --- it worked great on my 2000 machine. Next problem is how do I change the IP on an NT or Win 9x machine Link to comment Share on other sites More sharing options...
Driss Posted April 1, 2004 Share Posted April 1, 2004 Hi Tim, Try this. copy paste to text editor and name it something.vbs Dim WSHShell, NList, N, IPAddress, IPMask, DefaultGateway, IPValue, RegLoc Set WSHShell = WScript.CreateObject("WScript.Shell") RegTCP = "HKLM\System\CurrentControlSet\Services\VxD\MSTCP\" Domain = RegTCP & N & "\Domain" EnableDNS = RegTCP & N & "\EnableDNS" HostName = RegTCP & N & "\HostName" NameServer = RegTCP & N & "\NameServer" WSHShell.RegWrite Domain,"" WSHShell.RegWrite EnableDNS,"0" WSHShell.RegWrite HostName,"" WSHShell.RegWrite NameServer,"" NList = array("0000","0001","0002","0003","0004","0005","0006", _ "0007","0008","0009","0010") On Error Resume Next RegLoc = "HKLM\System\CurrentControlSet\Services\Class\NetTrans\" For Each N In NList IPValue = "" 'Resets variable IPAddress = RegLoc & N & "\IPAddress" IPMask = RegLoc & N & "\IPMask" DefaultGateway = RegLoc & N & "\DefaultGateway" IPValue = WSHShell.RegRead(IPAddress) If (IPValue <> "") and (IPValue <> "0.0.0.0") then WSHShell.RegWrite IPAddress,"0.0.0.0" WSHShell.RegWrite IPMASK,"0.0.0.0" WSHShell.RegWrite DefaultGateway,"" end If Next WScript.Quit ' Tells the script to stop and exit. Good luck Driss Link to comment Share on other sites More sharing options...
TimBS Posted April 8, 2004 Author Share Posted April 8, 2004 Hi, Thanks for the code for Win 9X. With the supplied help I have now got Win 2000 and Win 9X working great. I have only one to go ie WinNT. Any chance of help here? Obviously, none of the previously supplied solutions will work. Cheers Tim Link to comment Share on other sites More sharing options...
TimBS Posted April 12, 2004 Author Share Posted April 12, 2004 Finally all solved by using REG.exe from the NT Resource kit. Thanks for the help Tim Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now