MSFN Forum: netsh problem - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

netsh problem Rate Topic: -----

#1 User is offline   CypherBit 

  • Junior
  • Pip
  • Group: Members
  • Posts: 70
  • Joined: 04-June 04

Posted 09 January 2005 - 06:25 PM

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.


#2 User is offline   jbm 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 626
  • Joined: 16-September 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 10 January 2005 - 01:58 AM

looking at the netsh.exe command witha hex editor I can see it depends
on about 10 .dll files. Maybe one of them was removed with nlite.

#3 User is offline   Martin Zugec 

  • MSFN Expert
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,373
  • Joined: 24-January 04

Posted 10 January 2005 - 02:21 AM

Almost every win cmd utility is just frontend (for WMI or other frameworks)...

It depends on following dll libraries:
msvcrt.dll
advapi32.dll
kernel32.dll
mprapi.dll
ntdll.dll
ole32.dll
oleaut32.dll
rasapi32.dll
user32.dll
iphlpapi.dll

#4 User is offline   CypherBit 

  • Junior
  • Pip
  • Group: Members
  • Posts: 70
  • Joined: 04-June 04

Posted 10 January 2005 - 03:05 AM

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.

#5 User is offline   Martin Zugec 

  • MSFN Expert
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,373
  • Joined: 24-January 04

Posted 10 January 2005 - 03:32 AM

Wait, netsh works from cmd? So when it is not working?

Second question - which services did U disable?

#6 User is offline   CypherBit 

  • Junior
  • Pip
  • Group: Members
  • Posts: 70
  • Joined: 04-June 04

Posted 10 January 2005 - 05:07 AM

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 Updates
COM+ Event System
Cryptographic Services
DCOM Server Process Launcher
DHCP Client
Event Log
Kerio Personal Firewall 4
Network Connections
Plug and Play
Print Spooler
Remote Procedure Call (RPC)
Security Accounts Manager
Server
Shell Hardware Detection
Windows Audio
Windows Management Instrumentation
Workstation

Really 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.

#7 User is offline   Martin Zugec 

  • MSFN Expert
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,373
  • Joined: 24-January 04

Posted 10 January 2005 - 05:11 AM

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"

#8 User is offline   CypherBit 

  • Junior
  • Pip
  • Group: Members
  • Posts: 70
  • Joined: 04-June 04

Posted 10 January 2005 - 05:24 AM

C:\Documents and Settings\CypherBit>netsh
netsh>interface ip set address name="Local Area Connection" static 192.168.1.102 255.255.255.0 192.168.1.1 1
The 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.

#9 User is offline   Martin Zugec 

  • MSFN Expert
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,373
  • Joined: 24-January 04

Posted 10 January 2005 - 05:28 AM

I should try enabling RPC - many frameworks like wmi or netsh depends on this service

#10 User is offline   CypherBit 

  • Junior
  • Pip
  • Group: Members
  • Posts: 70
  • Joined: 04-June 04

Posted 10 January 2005 - 05:37 AM

Well RPC service is started as I posted a few moments ago.

#11 User is offline   Martin Zugec 

  • MSFN Expert
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,373
  • Joined: 24-January 04

Posted 10 January 2005 - 06:00 AM

Sorry, list disabled items pls...

#12 User is offline   CypherBit 

  • Junior
  • Pip
  • Group: Members
  • Posts: 70
  • Joined: 04-June 04

Posted 10 January 2005 - 06:07 AM

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.

Attached File(s)



#13 User is offline   Martin Zugec 

  • MSFN Expert
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,373
  • Joined: 24-January 04

Posted 10 January 2005 - 06:13 AM

Have a look here - it is list of netsh dependencies - http://msdn.microsoft.com/library/default....sXPEmbedded.asp

#14 User is offline   CypherBit 

  • Junior
  • Pip
  • Group: Members
  • Posts: 70
  • Joined: 04-June 04

Posted 10 January 2005 - 07:03 AM

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.

#15 User is offline   CypherBit 

  • Junior
  • Pip
  • Group: Members
  • Posts: 70
  • Joined: 04-June 04

Posted 11 January 2005 - 05:06 AM

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.

#16 User is offline   CypherBit 

  • Junior
  • Pip
  • Group: Members
  • Posts: 70
  • Joined: 04-June 04

Posted 12 January 2005 - 06:16 AM

Made some changes as to what to remove with nLite and it all works now.

Thank you for all the assistance.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy