the command (netsh interface ip set address "local area connection" static ) gives syntax error

M

mike-ca

i ran the command on my XPE image:
netsh interface ip set address "local area connection" dhcp

this command works.

however if i ran
netsh interface ip set address "local area connection" static
it gave me a syntax error "the syntax supplied for this command is not
valid"

not sure why this is happening.

thanks
 
K

KM

mike,

You are using wrong syntax for the command. So the error message is correct.
(just run your command on XP Pro and you'll get the same error)

To configure a static IP address, use should use the following syntax:

netsh interface ip set address <interface name> static <ip address> <mask> <default gateway> <gateway interface metric>

E.g.,
netsh interface ip set address name="Local Area Connection" source=static addr=192.168.0.100 mask=255.255.255.0 gateway=192.168.0.1
1
 
M

mike-ca

KM,

i ran the same command you provided, i got the same error.
"the syntax supplied for this command is not valid..", not sure why

thanks
 
K

KM

Hmm.. not sure what's the problem with the filed names but try this one:
netsh interface ip set address "Local Area Connection" static 192.168.0.100 255.255.255.0 192.168.0.1 1
 
M

mike-ca

KM,

i tried the command on a XP Pro machine, the same problem. i have been
very careful to make sure the command is correct.

thanks
 
K

KM

mike,

XP Pro (SP2) is what I tried first and that is where it worked no problem. Then an XPe image.

I am not sure why it doesn't work for you. Are you just copying/pasting the command from your news reader client to CMD window?
If you do and still gives you the same "syntax not valid" error, I have no more ideas :-(
 

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