Back from netsh

E

Eli

Hello all,

Upon an advice from a friend, I managed to use netsh in a batch file
to assign a static IP address for my laptop at work.

Now I am hoping you can help in the opposite, I mean a DOS prompt
command to tell my laptop to take dynamic IP address from the DHCP my
home router. Is it also available in c:\netsh?

Another question: Is there a command line to tell my IE6 to activate
the "Use Proxy Server" and assign the address and port#? I talking
about the Tools->Internet Options->Connections->Lan Settings->Proxy
Server settings.

Thanks all.
 
P

Pegasus \(MVP\)

Eli said:
Hello all,

Upon an advice from a friend, I managed to use netsh in a batch file
to assign a static IP address for my laptop at work.

Now I am hoping you can help in the opposite, I mean a DOS prompt
command to tell my laptop to take dynamic IP address from the DHCP my
home router. Is it also available in c:\netsh?

Another question: Is there a command line to tell my IE6 to activate
the "Use Proxy Server" and assign the address and port#? I talking
about the Tools->Internet Options->Connections->Lan Settings->Proxy
Server settings.

Thanks all.

You will find all netsh switches fully documented in netsh help, e.g.

netsh interface ip set address "Local Area Connection" DHCP
 
E

Eli

Thanks Pegasus, one learns something new everyday.
Do you possibly have a clue about my second question? Is there a
command line to tell my IE6 to activate the "Use Proxy Server" and
assign the address and port#? I talking about the Tools->Internet
Options->Connections->Lan Settings->Proxy Server settings.
Thanks again,
Eli
 
K

kr

Thanks Pegasus, one learns something new everyday.
Do you possibly have a clue about my second question? Is there a
command line to tell my IE6 to activate the "Use Proxy Server" and
assign the address and port#? I talking about the Tools->Internet
Options->Connections->Lan Settings->Proxy Server settings.
Thanks again,
Eli
you can access this via the registry,
HKLM\SOftware\Microsoft\Windows\CurrentVersion\Explorer\ -- look for key
"Proxy Enable"...

you can then use a batch and regedit4 file to change the key if you like.
 
P

Pegasus \(MVP\)

Eli said:
Thanks Pegasus, one learns something new everyday.
Do you possibly have a clue about my second question? Is there a
command line to tell my IE6 to activate the "Use Proxy Server" and
assign the address and port#? I talking about the Tools->Internet
Options->Connections->Lan Settings->Proxy Server settings.
Thanks again,
Eli

If this was my problem then I would scan the registry for the
specific proxy server string, then write a registry hack to
apply it from within a batch file.
 
E

Eli

Thank again Pegasus and thanks to KR as well.
I had already tried updating the relevant registry keys:

[HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet
Settings]
"ProxyEnable"=1

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet
Settings]
"ProxyEnable"=1
"ProxyOverride"="<local>"
"ProxyServer"="http://1.2.3.4:80"

When you open IE, you see the Proxy IP above properly filled in, the
"Bypass Proxy Server for Local Addresses" check box ticked as well,
but the "Use the Proxy Server for your LAN" check box still off. I
think I need a way to "activate the changes", not only "merge into
registry".

If you are aware of a DOS prompt command to lauch the "activation" I'm
after that will be great.

Thanks guys in advance,

Eli
 
P

Pegasus \(MVP\)

You need to be more precise when punching through registry
hacks. You used

"ProxyEnable"=1

whereas the correct instruction is

"ProxyEnable"=dword:00000001

You can easily find this out for yourself, by exporting the relevant
branch of the registry, then examining at the values you wish to
modify.
 
E

Eli

Heaps of thanks Pegasus.
The proper value is (dword:00000001) indeed. Problem solved.
Cheers,
Eli
 

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