IP adress change 
Author Message
 IP adress change

Hi,

does anyone know a way to change the local computer's IP adress on
NT4/SP4 from a VB5/SP3 program? I have no idea if/how this can be done,
any hints are appreciated...

Thanks

Michael



Fri, 28 Jun 2002 03:00:00 GMT  
 IP adress change
Perhaps there is a better way but, this is the method I know of.

Get together your best registry code modules.

First, your program must determine the adapter.  In order to do this, query
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NetBT\Adapters key.
Underneath this key will be one or more keys that represent the names of the
network adapters installed in the system.

For simplicity, let us assume that only 1 adapter, the N1001, exists in our
system.

Using this information, we query
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\N1001\Parameters\TCPIP

NOTE:  N1001 would be replaced with your adapter name

From this key, we see a hexidecimal entry called IPAddress.  Modify this as
needed.
NOTE:  DefaultGateway, and SubnetMask entries may require modification too.

Finally, in order for this change to occur, execute a system reboot.

If you have any questions, please feel free to contact me.

--
Shane C. Hage
MCSE+I, MCT
Independent Consultant
http://www.codearchive.com/home/shane


Quote:
> Hi,

> does anyone know a way to change the local computer's IP adress on
> NT4/SP4 from a VB5/SP3 program? I have no idea if/how this can be done,
> any hints are appreciated...

> Thanks

> Michael



Sat, 29 Jun 2002 03:00:00 GMT  
 IP adress change
Shane,

thanks. The first answer I was able to understand :-)

Quote:
> If you have any questions, please feel free to contact me.

Yes, one question is left, which I didn't know of at the time I posted
the first one.

The scenario is this:
Depending on where a laptop is in our company, I have to change it's IP
adress and gateway (ie, the frankfurt branch uses another IP range than
the Singapore one).
The problem is - although I do know the administrator user name and pw,
the user executing the program does not. And he doesn't have the rights
to change this data.

So, is there a way to tell NT, this current user doesn't have the rights
but I may change the adress since I have the account details of one that
does?

Thanks

Michael Ehrt
ERCO Leuchten GmbH



Tue, 02 Jul 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. IP-Adress change

2. HOW to change IP adress in Visual Basic..

3. how to change an ip adress???

4. HOW to change IP adress in Visual Basic..

5. Changing IP Adress

6. how to change an IP adress??

7. dynamically change ip adress ?

8. Changing the ip adress ?

9. proofing the input of ip adresses in access

10. How can I get the dynamic ip adress with vb.net

11. how to get ip adress..?

12. IP-Adress --> hostname

 

 
Powered by phpBB® Forum Software