I am new to scripting and I was wondering if this is possible. I want to use the netsh command but I obviously have a problem putting quotes inside quotes. Is there another way to enter "Wireless Network Connection" in the objFso.run line? Any help will be appreciated.
Option Explicit
Dim objFso
Dim cNetwork
Dim cDNS
Dim Perm
Set objFso = CreateObject("WScript.Shell"
cDNS = MsgBox("Would you like to change to local DNS?", vbYesno)
If cDNS = vbYes Then
Perm = objFso.run("netsh interface ip set dns "Wireless Network Connection" static 1.1.1.1 primary",1,True)
Else
Perm = objFso.run("netsh interface ip set dns "Wireless Network Connection" static 2.2.2.2 primary",1,True)
End If
Set objFso=Nothing
Option Explicit
Dim objFso
Dim cNetwork
Dim cDNS
Dim Perm
Set objFso = CreateObject("WScript.Shell"
cDNS = MsgBox("Would you like to change to local DNS?", vbYesno)
If cDNS = vbYes Then
Perm = objFso.run("netsh interface ip set dns "Wireless Network Connection" static 1.1.1.1 primary",1,True)
Else
Perm = objFso.run("netsh interface ip set dns "Wireless Network Connection" static 2.2.2.2 primary",1,True)
End If
Set objFso=Nothing