Hi All,
I found this code online that imports a wireless profile.
When I go to run it I get a error about Line 3, Character 35, invalid character. I am not sure what it is complaining about. Am I missing something in the line above? It appears to look ok, but then again I don't really write code........Thanks.
option explicit
Dim wshShell, strComputer, strKeyPath, oReg, arrSubKeys, subkey, command
Set wshShell=WScript.CreateObject(“WSCript.Shell”)
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer=“.”
Set oReg=GetObject(“winmgmts:{impersonationLevel=impersonate}!\\” & _
strComputer & “\root\default:StdRegProv”)
strKeyPath=“Software\Microsoft\WZCSVC\Parameters\Interfaces\”
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
For Each subkey In arrSubKeys
subkey=Replace(subkey, “{“, “”)
subkey=Replace(subkey, “}”, “”)
‘Used for testing: Wscript.Echo “WLAN.exe sp ” & subkey & ” CMH_Data_Network.xml”
command=“C:\WLAN.exe sp ” & subkey & ” C:\CMH_Data_Network.xml”
wshShell.run command, 6, True
Next
set wshshell=nothing
I found this code online that imports a wireless profile.
When I go to run it I get a error about Line 3, Character 35, invalid character. I am not sure what it is complaining about. Am I missing something in the line above? It appears to look ok, but then again I don't really write code........Thanks.
option explicit
Dim wshShell, strComputer, strKeyPath, oReg, arrSubKeys, subkey, command
Set wshShell=WScript.CreateObject(“WSCript.Shell”)
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer=“.”
Set oReg=GetObject(“winmgmts:{impersonationLevel=impersonate}!\\” & _
strComputer & “\root\default:StdRegProv”)
strKeyPath=“Software\Microsoft\WZCSVC\Parameters\Interfaces\”
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
For Each subkey In arrSubKeys
subkey=Replace(subkey, “{“, “”)
subkey=Replace(subkey, “}”, “”)
‘Used for testing: Wscript.Echo “WLAN.exe sp ” & subkey & ” CMH_Data_Network.xml”
command=“C:\WLAN.exe sp ” & subkey & ” C:\CMH_Data_Network.xml”
wshShell.run command, 6, True
Next
set wshshell=nothing