saylor Posted May 18, 2005 Share Posted May 18, 2005 All the registery tweaks you have here are great. I'm creating an unattended Windows XP workstation load. I use a generic ip address and computername. Once I build the workstation, I need to change both the ipaddress and computername. I've figured out how to change the computername, but I have not been able to find out how to change the ip address of a running workstation with minimal user intervention. I'm creating a script that asks the user one question. Through that I can derive what Ip address and computername they need to be. Again, I've got the computername done via the registery, how can I change the ip address?Any ideas? Link to comment Share on other sites More sharing options...
Doc Symbiosis Posted May 18, 2005 Share Posted May 18, 2005 Perhaps have a try with the following vb script:It only asks for the data and then runs the command"netsh interface ip set address source=static name="Local Area Connection" addr=xxx.xxx.xxx.xxx mask=xxx.xxx.xxx.xxx gateway=xxx.xxx.xxx.xxx 1"Set wshshell = CreateObject("WScript.Shell")ip = "134.76.210.86"subnet ="255.255.0.0" gateway ="134.76.210.254"'msg = "Want you to set a static IP? "& VbCr &"(If no DHCP is enabled)?" antwort = MsgBox(msg, vbYesNo + vbQuestion)if antwort = vbNo then befehl ="netsh interface ip set address source=dhcp name= "&"""Local Area Connection""" command = "%COMSPEC% /C " & befehl resultat = wshshell.Run ( kommando, 1, True ) befehl ="netsh interface ip delete dns name="&"""Local Area Connection""" & " addr=all" command = "%COMSPEC% /C " & befehl resultat = wshshell.Run ( kommando, 1, True ) befehl ="netsh interface ip delete wins name="&"""Local Area Connection""" & " addr=all" command = "%COMSPEC% /C " & befehl resultat = wshshell.Run ( kommando, 1, True ) WScript.Quitend ifip_neu = InputBox("Please enter the IP:","Enter IP number", ip )subnet_neu = InputBox("Please enter subnetmask:","Enter subnetmask", subnet )gateway_neu = InputBox("Please enter gateway:","Enter gateway", gateway )befehl ="netsh interface ip set address source=static name= "&"""Local Area Connection"""&" addr="& ip_neu &" mask="& subnet_neu &" gateway="& gateway_neu & " 1" command = "%COMSPEC% /C " & befehl resultat = wshshell.Run ( kommando, 1, True )If Not resultat = 0 Then MsgBox ("Changing of IP failed")End If Link to comment Share on other sites More sharing options...
matthewk Posted June 15, 2005 Share Posted June 15, 2005 (edited) Here is a nice spoofing method. I use my phone number for my mac address.1. "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}". There are subkeys of 4-digit numbers, which represent particular network adapters (0000, 0001, 0002, 0003, etc.).2. Find the interface you want by searching for the proper "DriverDesc" key. 3. Edit, or add, the string key "NetworkAddress" (has the data type "REG_SZ") to contain the new MAC address. 4. Disable then re-enable the network interface that you changed (or reboot the system). Edited June 15, 2005 by matthewk Link to comment Share on other sites More sharing options...
Aegis Posted June 19, 2005 Share Posted June 19, 2005 @matthewkAre you sure that would work? Wouldn't the device just reset the MAC on reset? And I was under the assumption that he wanted the IP address changed, which is not the same as the MAC. Link to comment Share on other sites More sharing options...
FrankE9999 Posted June 19, 2005 Share Posted June 19, 2005 (edited) Deleted Edited June 19, 2005 by FrankE9999 Link to comment Share on other sites More sharing options...
matthewk Posted June 20, 2005 Share Posted June 20, 2005 @AegisI posted that information incase anyone visited this topic for similar information. I am on a LAN; my IP is related to my mac address. With dialup, typically a user will just disconnect and reconnect to change IP address. With the network I am on, I changed my mac address and disabled/reenabled the ethernet connection to change IP address. 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