Error DataBase-One Place all Solutions Forums Blog Glossary    Contact Us
Search  
   
Browse by Category
Error DataBase-One Place all Solutions .: Operating Systems .: Windows Operating Systems .: Windows Scripts and Batch Files .: VB Script to SET DNS info for Primary and Secondary DNS entries

VB Script to SET DNS info for Primary and Secondary DNS entries

For each oInstance in oResults

'            If Not IsNull(oInstance.WINSPrimaryServer) then

            If Not (oInstance.WINSPrimaryServer = "127.0.0.0") then  

            oInstance.SetDNSServerSearchOrder sDNSServers

                        If err.number<>0 Then

                                    'wscript.echo err.description

                                    s=s & vbTAB & "SetDNSFAILED-" & err.description

                        Else

                                    s=s & vbTAB & "SetDNSSsuccess"

                                    'Set oExec = WshShell.Exec("nbtstat.exe -a " & sServer & " -RR")

                                                'If Not oExec.StdOut.AtEndOfStream Then

                                                '            input = input & oExec.StdOut.ReadLine

                                                '            MyGoodMsg = Len(sGoodMsg) ' MyString contains 65 chars + 6 blank chars = 71 chars

                                                '            MyInput = Len(input)

                                                '                        If MyGoodMsg = MyInput Then

                                                '                                    wscript.echo "NBTSTAT SUCCESS-" & input

                                                '                                    s=s & vbTAB & "NBTSTAT SUCCESS-" & input

                                                '                        Else

                                                '                                    wscript.echo "NBTSTAT FAILED-" & input

                                                '                                    s=s & vbTAB & "NBTSTAT FAILED-" & input

                                                '                        End If

                                                'End If

                        End If

            End If

Err.Clear

Next

 

 

 

 

 

's=s & vbTAB & UCASE(sServer)


How helpful was this article to you?

Related Articles

article useful info on DOSKEY
Recall and edit commands at the DOS prompt,...

(No rating)  3-7-2008    Views: 131   
article How to add, modify, or delete registry subkeys and values by using a registration entries (.reg) file
 If you use Registry Editor...

  2-1-2008    Views: 3505   
article How to Get domain, browser and PDC info using BROWSTAT.exe (Resource Kit)
. Get domain, browser and PDC info. ...

(No rating)  3-7-2008    Views: 168   

User Comments

Add Comment
No comments have been posted.