devil270975 Posted February 9, 2010 Share Posted February 9, 2010 (edited) Hi y'all, there was a command in Vista that allowed to set a kind of domain name to your pc that allowed some kind of static address, it involved netsh i'm sure of that, but can i find the commands on google? CIF!!! does anybody know what they are??? any help would be greatly appreciated...Lee... Edited February 11, 2010 by devil270975 Link to comment Share on other sites More sharing options...
luke.mccormick Posted February 9, 2010 Share Posted February 9, 2010 I'm not sure what you're talking about as it's not very clear, but here are a few ideas.Maybe you're talking about a user class in a DHCP scope that allows a specific device to grab DHCP lease, but with different options than your standard scope (such as DNS servers, and a diferent gateway) This would be in Windows Server, not in NETSHYou can use standard DHCP Reservations, also for Windows server, not in netsh.You can set a DNS Suffix to your computer, or your network connection, not sure if you can control this with NETSH, but I believe you can through the registry.You could also just set a static IP through NETSHAre any of these what you're talking about?Thanks, Luke. Link to comment Share on other sites More sharing options...
MrJinje Posted February 9, 2010 Share Posted February 9, 2010 (edited) Why not read up on NETSH and tell us if that is what you are looking for.http://ss64.com/nt/netsh.htmlAs for the "kinda domain name" do you mean your WorkGroup name ? You can do that very easy, just right click Computer > Properties > Change Settings and set your Workgroup that way. Edited February 9, 2010 by MrJinje Link to comment Share on other sites More sharing options...
cluberti Posted February 9, 2010 Share Posted February 9, 2010 Yeah, not sure exactly what you mean. Netsh can set network configuration settings, but netsh can't do anything for a domain or computer name. Maybe you're talking about IPs and Firewall/location settings? If you could be a little more clear in what you're trying to achieve, we can try to help. Link to comment Share on other sites More sharing options...
hclarkjr Posted February 10, 2010 Share Posted February 10, 2010 Hi y'all, there was a command in Vista that allowed to set a kind of domain name to your pc that allowed some kind of static address, it involved netsh i'm sure of that, but can i find the commands on google? CIF!!! does anybody know what they are??? any help would be greatly appreciated...Lee...http://www.speedguide.net/read_articles.php?id=2574 is that what you are looking for? Link to comment Share on other sites More sharing options...
devil270975 Posted February 11, 2010 Author Share Posted February 11, 2010 Solved: http://apcmag.com/every_vista_pc_to_get_a_domain_name.htmthanks for your help though... Link to comment Share on other sites More sharing options...
mobious99 Posted February 17, 2010 Share Posted February 17, 2010 (edited) I wrote a vbscript that does most of the netsh stuff that way it will ask you what you want it also will do the domain stuff / wins etcone of the tricks that I do with netsh is to get the network adapter and then change it based on the driver it's using.for example the one that I have here is for hp nic teams.dim stripaddrdim strsubnetdim strgatewaydim strdns1dim strdns2dim strdns3dim strwins1dim strwins2strComputer = "."Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")Set colItems = objWMIService.ExecQuery("Select * from Win32_NetworkAdapter where Name = 'HP Network Teaming Virtual Miniport Driver'")For Each objItem in colItems 'Wscript.Echo "Net Connection ID: " & objItem.NetConnectionID strnicname=objItem.NetConnectionIDnext'strnicname = objItem.NetConnectionID'wscript.echo strnicnameConst NETWORK_CONNECTIONS = &H31&Set objShell = CreateObject("Shell.Application")Set objFolder = objShell.Namespace(NETWORK_CONNECTIONS)Set colItems = objFolder.ItemsFor Each objItem in colItems If objItem.Name = strnicname Then objItem.Name = "Public Team" End IfNextstripaddr = InputBox("Please enter the IP address:","Enter IP Address for the Team", ip )strsubnet = InputBox("Please enter subnetmask:","Enter Team subnetmask", subnet )strgateway = InputBox("Please enter the default gateway:","Enter Team Default gateway", gateway )'strdns1 = InputBox("Please enter the default first dns server:","Enter Dns Server1", strdns1 )'strdns2 = InputBox("Please enter the default Second dns server:","Enter Dns Server2", strdns2 )'strdns3 = InputBox("Please enter the default Third dns server:","Enter Dns Server3", strdns3 )'strwins1 = InputBox("Please enter the first wins server:","Enter wins server 1", strwins1 )'strwins2 = InputBox("Please enter the second wins server:","Enter Wins server2", strwins2 )'stripaddr = "192.168.1.49"'strsubnet = "255.255.255.0"'strgateway = "192.168.1.1"strdns1 = "1.1.1.1"strdns2 = "1.1.1.1"'strdns3 = "1.1.1.1"strwins1 = "1.1.1.1"strwins2 = "1.1.1.1"strcommand = "netsh interface ip set address name=""Public Team"" source=static " & stripaddr & " " & strsubnet & " " & strgateway & " 1"strcommand1 = "netsh interface ip set dns ""Public Team"" static addr="&strdns1&" register=PRIMARY"strcommand2 = "netsh interface ip add dns ""Public Team"" addr="&strdns2&" index=2"strcommand3 = "netsh interface ip add dns ""Public Team"" addr="&strdns3&" index=3"strcommand4 = "netsh interface ip set wins name=""Public Team"" source=static addr="&strwins1&""strcommand5 = "netsh interface ip add wins name=""Public Team"" addr="&strwins2&" index=2"'WScript.Echo "Running command: " & strCommand'WScript.Echo "Running command: " & strCommand1'WScript.Echo "Running command: " & strCommand2'WScript.Echo "Running command: " & strCommand3'WScript.Echo "Running command: " & strCommand4'WScript.Echo "Running command: " & strCommand5set objshell = wscript.createobject("wscript.shell")objshell.run ("%comspec% /c " & strcommand) ,0,trueset objshell = wscript.createobject("wscript.shell")objshell.run ("%comspec% /c " & strcommand1) ,0,trueset objshell = wscript.createobject("wscript.shell")objshell.run ("%comspec% /c " & strcommand2) ,0,trueset objshell = wscript.createobject("wscript.shell")objshell.run ("%comspec% /c " & strcommand3) ,0,trueset objshell = wscript.createobject("wscript.shell")objshell.run ("%comspec% /c " & strcommand4) ,0,trueset objshell = wscript.createobject("wscript.shell")objshell.run ("%comspec% /c " & strcommand4) ,0,trueset objshell = wscript.createobject("wscript.shell")objshell.run ("%comspec% /c " & strcommand5) ,0,true'now to add the dns suffixesOn Error Resume NextstrComputer = "."Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")Set colNetCards = objWMIService.ExecQuery _ ("Select * From Win32_NetworkAdapterConfiguration Where where Name = 'HP Network Teaming Virtual Miniport Driver'")Set objNetworkSettings = objWMIService.Get("Win32_NetworkAdapterConfiguration")arrDNSSuffixes = Array("somewhere.com", "somewhere.net", "yoursite.com", "another.com")objNetworkSettings.SetDNSSuffixSearchOrder(arrDNSSuffixes)'CODE 1 **************************' Correctly sets IP, Subnet, DNS, Gateway'On Error Resume Next' WINS Section' 0 : enable NetBIOS via DHCP' 1 : enable NetBIOS' 2 : disable NetBIOSiNetBios = 1strComputer = "."Set objWMIService = GetObject("winmgmts:" _& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")Set colNetAdapters = objWMIService.ExecQuery _("Select * from Win32_NetworkAdapterConfiguration where where Name = 'HP Network Teaming Virtual Miniport Driver'")' WINS SectionFor Each objNetAdapter in colNetAdapters objNetAdapter.SetTCPIPNetBIOS(iNetBios)Next Edited February 17, 2010 by Tripredacus Please use code or codebox tags 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