Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with updating WINS Settings with vb

Status
Not open for further replies.

boom23242

Technical User
Sep 10, 2002
5
0
0
AU
Hi All,

I need help with updating the Primary WINS Server and Secondary WINS Server settings for computers using Dial Up Networking.

I am using the following script.

On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colNetCards = objWMIService.ExecQuery _
("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True")
For Each objNetCard in colNetCards
strPrimaryServer = "192.168.1.100"
strSecondaryServer = "192.168.1.200"
objNetCard.SetWINSServer strPrimaryServer, strSecondaryServer
Next

It easily updates users connected to the LAN but will not update the Primary and Secondary WINS Settings for Dial Up Users.

Does anybody know why this is?

Thanks,
Joe
 
I'm having the exact same problem as Joe.

Anyone know how to fix this?

Thanks.

-Mike
 
Hi Mike,

I managed to find out that WINS Settings for dial up users are actually hardcoded into rasphone.pbk. So, even though the changes were being made in the registry it was being overwritten when this file is read.

So make your WINS changes to this file instead and it should work a little bit better.

Regards,
Joe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top