Netsh- "Incorrect Function" trying to set IP.

J

Jeff

I did a search for "netsh, Incorrect function" and I didn't see
anything matching what I'm seeing.

I'm trying to set a static IP using netsh.
Running CMD-shell only, I do the following (after FBA successfully
completes):

:>Rundll32 netshell.dll HrRenameConnection

:>netsh interface ip set address "Local Area Connection" static
164.101.60.115 255.255.0.0 none

--Response:
"WARNING: Could not obtain host information from machine: [OEM-...].
Some commands may not be available.
Class not registered

Incorrect Function"



--To test the interface name, I can misspell "Local Area Connion" in
the netsh command above and it returns:
""WARNING: Could not obtain host information from machine: [OEM-...].
Some commands may not be available.
Class not registered

Invalid interface "Local Area Connion" specified"



-To test the netsh, I do a "netsh interface ip show address" and get
the following:
"WARNING: Could not obtain host information from machine: [OEM-...].
Some commands may not be available.
Class not registered

No more data is available."




-I try and do an ipconfig (or ipconfig /all) and all I get is:

"Windows IP Configuration

"
No info is generated.




If I boot teh same PC from the WinXPe install CD, DHCP is configured
and works properly (I can ipconfig, map a drive, use network).

-Netsh /? Returns the proper help topics, so I'm pretty sure I have
the correct components installed for netsh.

Am I making a stupid mistake or missing a component??
My runtime PC has two NICs.. Is this a problem?
Any help is greatly appreciated…

- Jeff
 
K

KM

Jeff,

Check if you have these components in your configuration:
- IP Router Monitor Library
- Network Command Shell
- Network Command Shell Interface Context
 
L

Leonid

Hi, James
The problem may be in missed netsh helper dll. Each netsh argument has
corresponded helper dll.
1. Run "netsh show helper"- you will see the list of helper dlls and
commands. Compare it with same command on your Win XP Pro box.
2. Find your missed helper dll
3. Search this dll in TD and add it to build
4. On your target machine run "netsh add helper xxxxxx.dll.
\Leonid

James Beau Cseri said:
Possible that you might have some components missing. This link tells you
all you need for doing what you want to do. Good luck!

http://msdn.microsoft.com/library/d...ml/tchWorkingWithNetshInWindowsXPEmbedded.asp

Jeff said:
I did a search for "netsh, Incorrect function" and I didn't see
anything matching what I'm seeing.

I'm trying to set a static IP using netsh.
Running CMD-shell only, I do the following (after FBA successfully
completes):

:>Rundll32 netshell.dll HrRenameConnection

:>netsh interface ip set address "Local Area Connection" static
164.101.60.115 255.255.0.0 none

--Response:
"WARNING: Could not obtain host information from machine: [OEM-...].
Some commands may not be available.
Class not registered

Incorrect Function"



--To test the interface name, I can misspell "Local Area Connion" in
the netsh command above and it returns:
""WARNING: Could not obtain host information from machine: [OEM-...].
Some commands may not be available.
Class not registered

Invalid interface "Local Area Connion" specified"



-To test the netsh, I do a "netsh interface ip show address" and get
the following:
"WARNING: Could not obtain host information from machine: [OEM-...].
Some commands may not be available.
Class not registered

No more data is available."




-I try and do an ipconfig (or ipconfig /all) and all I get is:

"Windows IP Configuration

"
No info is generated.




If I boot teh same PC from the WinXPe install CD, DHCP is configured
and works properly (I can ipconfig, map a drive, use network).

-Netsh /? Returns the proper help topics, so I'm pretty sure I have
the correct components installed for netsh.

Am I making a stupid mistake or missing a component??
My runtime PC has two NICs.. Is this a problem?
Any help is greatly appreciated.

- Jeff
 
J

Jeff

I confirmed the following in my image:
CMD – Windows Command Processor
Network Command Shell
Network Command Shell Interface Context
IP Router Monitor Library
Network Diagnostics
Remote Access Monitory

And I'll try and add ‘Home Networking Monitory Library' (although I
don't think this will help).


Do you think it has something to do with netsh and not something else
(like missing component)??
Netsh seems to work ok for what I'm using it for. It just can't
"touch" or "see" the NICs.
Would this have anything to do with ipconfig returning nothing?

I would like to try a Test image with running the explorer.exe one
time to automatically name the interfaces, but that will be difficult
due to size constraints.


Frustrating.

Thanks a million for all of your help!
 
K

KM

Jeff,

The problem is unlikely with netsh helpers. Something is likely missing on
the TCP/IP stack.
Can you try adding these components too:
"IP Security Services",
"Primitive: W32topl"

KM
 
J

Jeff

I agree.. My problem seems to be un-related to netsh in particular.

My image already had
"IP Security Services"
and I added
"Primitive: W32topl"

No change to the current problem.. same results.

Any other suggestions (PLEASE!!!)?
I'll also keep searching through this NewsGroup.

Thanks tremendously for your help.

- Jeff
 
S

Slobodan Brcin \(eMVP\)

Hi Jeff,

I can't see any reference and I always assumed following:
That you know for sure that your NIC's are installed. Have you used Device Manager to check them and make sure they are working?

Best regards,
Slobodan
 
J

Jeff

Thank you for replying.

UPDATE: I added 'Home Networking Monitory Library', but it did not
help the problem in any way.

"IP Security Services" is already included in my image.

I added the "Primitive: W32topl" and that had no affect at run-time
either.


I currently have "Basic TCP/IP Networking" installed. Do you think I
should replace that with "TCP/IP with Client for MS Networks" or
something else?

Adding more components, or larger components, is now becoming a
concern since I am at 55-MB of a 64-MB flash-disk.


Thanks again for your help.
 
K

KM

Jeff,

I don't think "TCP/IP Networking with Client For MS Networks" will bring much versus "Basic TCP/IP Networking" macro (only "Client
for Microsoft Networks" macro along with its dependencies which are useless in fixing your issue, I think). Although, I must admit
that the minlogon build I was looking at when replied you earlier includes the "Client for Microsoft Networks".

Anyway, turn off the Auto-Resolve dependencies feature in TD, add "TCP/IP with Client for MS Networks" macro to the Configuration
and run Dependency Check. See if you get anything in the tasks.

You, basically, have two (three) way of figuring out the problem (I'll list them in the descending order of simplicity):
- Use Regmon/Filemon at run time to see what's missing when you run ipconfig.
- Compare your Configuration component list to any of minlogon images (small enough) with working ipconfig tool (I can provide
you the list from one of my builds)
- Try playing with the network stack components in TD to find out the one that's missing. Basically, just adding component by
component to not blow up the image size. Tedious approach, though.
 
J

Jeff

Yes, that is correct.

I can boot from the WinXPe CD and both cards are detected and
configured for dhcp. Network is fine since I can map a network drive &
ping.
Ipconfig /all works fine also (shows correct addresses).
I even created a netsh dump file using "netsh interface ip dump
staticIP.txt". It shows both NICs configured for dhcp.

Without touching the PC, so the hardware is unchanged, I boot to my
run-time image and I get the above situations.

I am running CMD-shell, so I assume I do not have a device manager,
correct?

One thing I'd like to note is that I can ping loopback (127.0.0.1)
successfully in my run-time image. I found a similar posting in this
Newsgroup that refereed to this. That insinuates that my TCP/IP stack
is installed correctly, no? If so, then it looks to be interface
related.

HELP!!!!

Thanks a million,

Jeff
 
S

Slobodan Brcin \(eMVP\)

Hi Jeff,

Considering your description there is a hope after all that you nic drivers are not installed.
There is devcon.exe utility that will allow you to see what drivers are installed and working from command prompt.
As you know local loopback does not tell us about network card drivers and they are important since you can't see them according to
your description.
Also look at setupapi.log to see if there are errors during the net card drier installation.

Good luck,
Slobodan
 
J

Jeff

Update:

I ran devcon.exe, and there were no errors reported. Both NICs are
listed.

I ran "snetcfg -v -s a"- and it displays the adapters as follows:
Instance ID Description
PCI\VEN_1022&DEV_2000&SUBSYS_20001022&REV_44\3&755BA3F&0&10F0 AMD
PCNET Family PCI Ethernet Adapter

PCI\VEN_8086&DEV_1229&SUBSYS_000C8086&REV_08\3&755BA3F&0&00F0 Intel ®
Pro/ 100 + Management Adapter




I ran "snetcfg -s n" to display the installed net components, and the
only Protocol listed is 'ms_ndisuio NDIS Usermode I/O'.
Again, I don't know if this is normal or not.

I have the "Basic TCP/IP Networking" component installed, so I would
assume I would see tcp/ip as a protocol here, no?


I ran "snetcrfg -b ms_tcpip" and nothing is displayed (jumps to nest
cmd prompt).

Related??

Also, More interesting:
I was going to start throwing in network stack components in TD.
From the minlogon configuration that I can boot too (yet have no
networking) I just added "Client for Microsoft Networks". I allowed
the auto-resolve to install what it needed for this component and
created a build.
When I installed it, it would not boot. After BIOS, the screen goes
blank. No activity. I reverified this just to make sure.

I also tried replacing "Basic TCP/IP Networking" with "TCP/IP
Networking with Client For MS Networks" and it didn't boot either.

Any thoughts on this one?

Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top