CypherBit Posted January 10, 2005 Share Posted January 10, 2005 I read about netsh in different places and decided to use it. I tried it on my normal Windows XP SP1 and had no problems, then I proceeded to test it on my customized (using nlite - meaning lots of services, components are removed) Windows XP SP2 and I keep getting: "the following command was not found". The command I'm trying to execute is nothing out of the ordinary "netsh interface ip set address name="Local Area Connection" static 192.168.1.102 255.255.255.0 192.168.1.1 1" . So this got me wondering is the netsh.exe the only file needed for this great utility to work? Does netsh.exe rely on any service which needs to be up and running so it does work? BTW netsh.exe is in my system32 folder.I know I removed lots of things from that Windows XP SP2 but I thought that netsh.exe is a standalone utility and would work as such. Was I wrong?Any information whatsoever (even hunches count) will be greatly appreciated. Link to comment Share on other sites More sharing options...
jbm Posted January 10, 2005 Share Posted January 10, 2005 looking at the netsh.exe command witha hex editor I can see it dependson about 10 .dll files. Maybe one of them was removed with nlite. Link to comment Share on other sites More sharing options...
Martin Zugec Posted January 10, 2005 Share Posted January 10, 2005 Almost every win cmd utility is just frontend (for WMI or other frameworks)... It depends on following dll libraries:msvcrt.dlladvapi32.dllkernel32.dllmprapi.dllntdll.dllole32.dlloleaut32.dllrasapi32.dlluser32.dlliphlpapi.dll Link to comment Share on other sites More sharing options...
CypherBit Posted January 10, 2005 Author Share Posted January 10, 2005 Thank you both for your replies, was so happy because I was certain this is it. But it doesn't seem that way. All the libraries soulin pointed out are in my system32 folder but I'm still getting that same error.If I go to cmd I can execute netsh and even look up help on all the commands available so it might be that netsh actually has all the required files. Why it fails to execute that simple command is beyond me...hopefully someone else knows.I doubt that netsh depends on any service but that might be the case...I would test that myself but quite a few services are removed. Link to comment Share on other sites More sharing options...
Martin Zugec Posted January 10, 2005 Share Posted January 10, 2005 Wait, netsh works from cmd? So when it is not working?Second question - which services did U disable? Link to comment Share on other sites More sharing options...
CypherBit Posted January 10, 2005 Author Share Posted January 10, 2005 When I said it works from cmd I meant if I just do "netsh" I get switched over to netsh> I can type help and so forth there but I cannon execute that command (I never execute it anywhere else...there was a small misunderstanding here).These services are started (most of the others are either disabled or removed):Automatic UpdatesCOM+ Event SystemCryptographic ServicesDCOM Server Process LauncherDHCP ClientEvent LogKerio Personal Firewall 4Network ConnectionsPlug and PlayPrint SpoolerRemote Procedure Call (RPC)Security Accounts ManagerServerShell Hardware DetectionWindows AudioWindows Management InstrumentationWorkstationReally don't know if any service is needed but since I have all those .dlls in my system32 I don't know what else could be causing this.Once (hope that day comes) I can get netsh to execute that command I'll disable DHCP Client service as well. Link to comment Share on other sites More sharing options...
Martin Zugec Posted January 10, 2005 Share Posted January 10, 2005 When U run that command from netsh cmd, what error do U get? I mean run netsh and input interface ip set address name="Local Area Connection" static 192.168.1.102 255.255.255.0 192.168.1.1 1" Link to comment Share on other sites More sharing options...
CypherBit Posted January 10, 2005 Author Share Posted January 10, 2005 C:\Documents and Settings\CypherBit>netshnetsh>interface ip set address name="Local Area Connection" static 192.168.1.102 255.255.255.0 192.168.1.1 1The following command was not found: interface ip set address name="Local Area Connection" static 192.168.1.102 255.255.255.0 192.168.1.1 1.I wasted at least an hour googling going through MS KB and haven't found anything. Link to comment Share on other sites More sharing options...
Martin Zugec Posted January 10, 2005 Share Posted January 10, 2005 I should try enabling RPC - many frameworks like wmi or netsh depends on this service Link to comment Share on other sites More sharing options...
CypherBit Posted January 10, 2005 Author Share Posted January 10, 2005 Well RPC service is started as I posted a few moments ago. Link to comment Share on other sites More sharing options...
Martin Zugec Posted January 10, 2005 Share Posted January 10, 2005 Sorry, list disabled items pls... Link to comment Share on other sites More sharing options...
CypherBit Posted January 10, 2005 Author Share Posted January 10, 2005 Like I said I have removed quite a few and disabled others. I'm attaching a screenshot of all the services. I tried starting pretty much all of them and I keep getting that error. Link to comment Share on other sites More sharing options...
Martin Zugec Posted January 10, 2005 Share Posted January 10, 2005 Have a look here - it is list of netsh dependencies - http://msdn.microsoft.com/library/default....sXPEmbedded.asp Link to comment Share on other sites More sharing options...
CypherBit Posted January 10, 2005 Author Share Posted January 10, 2005 Thank you soulin we sure are making progress now When I list all available netsh commands the "interface" one is missing.After looking at the link you posted it seems quite clear that I'm missing the "Network Command Shell Interface Context and IP Monitor Routing" component which is needed for the "interface" command.Now the problem is I have no idea what I need to do to install this component (include it in my next uA install) or what I mustn't remove using nLite so that this particular component will remain. Link to comment Share on other sites More sharing options...
CypherBit Posted January 11, 2005 Author Share Posted January 11, 2005 Could someone please move this to the nLite forum because I think the chances of fixing this problem of mine will increase there. It's obvious that I removed a component using nLite that netsh needs to execute the "interface" command.I just need to find out what that is.Thank you in advance. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now