Anyone can give me the solution

P

POS

David,

Thank you very much!
However, I want to know how to run the shell script with
different network configuration that select by the user
with same login ID. Can we do it using Hardware profile?
For examples, if we setup a Hardware profile1, it will run
the dhcp_ip.bat and if we setup a Hardware profile2, it
will run the static_ip.bat.
Can we do that? Anyone can give me solution?
Need your help thx.

-----Original Message-----
You're right, you can't do it that way. You might try netsh From a command
prompt;

1 to set static ip address and subnet, 2 to set dhcp assign ip address 3 to
clear previous dns server ip's, 4 to set primary dns server, 5 to set alt
dns server

1.) netsh interface ip set address name="Local Area Connection 2"
source=static addr=192.168.10.10 mask=255.255.2550 gateway=none
2.) netsh interface ip set address name="Local Area Connection 2"
source=dhcp
3.) netsh interface ip delete dns name="Local Area Connection 2" addr=all
4.) netsh interface ip set dns name="Local Area Connection 2" source=static
addr=192.168.20.20
5.) netsh interface ip add dns name="Local Area Connection 2"
addr=192.168.30.30

Where "Local Area Connection 2" is the name of your connection. Watch for
line wrap.

Create shell scripts to switch it back and forth.


--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft MVP [Windows NT/2000 Operating Systems]

POS said:
I have a laptop in window 2000 professional and need to
login the network to get IP with DHCP if I stay in HK.
I login the network with fix IP if I stay in China.
Therefore, I want to setup a hardware profile that can
select the profile(HK or China network) by the user.
There is no need to change the network configuration.
However, I can't do that!
Any suggestion to solve the problem?
Expert Pls! Thanks a lots
 
D

Dave Patrick

Asked and answered in win2000.setup

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft MVP [Windows NT/2000 Operating Systems]

POS said:
David,

Thank you very much!
However, I want to know how to run the shell script with
different network configuration that select by the user
with same login ID. Can we do it using Hardware profile?
For examples, if we setup a Hardware profile1, it will run
the dhcp_ip.bat and if we setup a Hardware profile2, it
will run the static_ip.bat.
Can we do that? Anyone can give me solution?
Need your help thx.

-----Original Message-----
You're right, you can't do it that way. You might try netsh From a command
prompt;

1 to set static ip address and subnet, 2 to set dhcp assign ip address 3 to
clear previous dns server ip's, 4 to set primary dns server, 5 to set alt
dns server

1.) netsh interface ip set address name="Local Area Connection 2"
source=static addr=192.168.10.10 mask=255.255.2550 gateway=none
2.) netsh interface ip set address name="Local Area Connection 2"
source=dhcp
3.) netsh interface ip delete dns name="Local Area Connection 2" addr=all
4.) netsh interface ip set dns name="Local Area Connection 2" source=static
addr=192.168.20.20
5.) netsh interface ip add dns name="Local Area Connection 2"
addr=192.168.30.30

Where "Local Area Connection 2" is the name of your connection. Watch for
line wrap.

Create shell scripts to switch it back and forth.


--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft MVP [Windows NT/2000 Operating Systems]

POS said:
I have a laptop in window 2000 professional and need to
login the network to get IP with DHCP if I stay in HK.
I login the network with fix IP if I stay in China.
Therefore, I want to setup a hardware profile that can
select the profile(HK or China network) by the user.
There is no need to change the network configuration.
However, I can't do that!
Any suggestion to solve the problem?
Expert Pls! Thanks a lots
 

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