Hi all i have a quetion how can i change the IP or default mask ,gateway,DNS Server IP of a Network Card in vb6 is there a class module or module i could use for this
Follow this steps :
1. Open registry on the HKEY_LOCAL_MACHINE
2. Find the subKey = SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\"netcard# "
"netcard# " usually is "1" but you can control any subkey and find specific netwrok Adapters
Refer to "MSDN Registry Entries for Network Adapter Cards"
3. Get data for the value "ServiceName"
4. Find the subKey = SYSTEM\CurrentControlSet\Services\"ServiceName"\Parameters\TcpIp"
5. Set data for the value "IpAddress" to change IP address
6. Set data for the value "SubnetMask" to change subnet mask
7. Set data for the value "DefaultGateway" to change default gateway
8. Reboot your PC.
__________________
Code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. ~Martin Golding
The user is a peripheral that types when you issue a read request. ~Peter Williams MSDN Visual Basic .NET General FAQ
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET. subscribe