0
我想自動填充用戶名和密碼的代理身份驗證值,即使用vbscript。爲使用Vbscript設置代理身份驗證
將代理IP和端口添加到工具> Internet選項>連接選項卡> LAN設置後。我提示以下對話框
有沒有用,反正VBS或VB自動填充呢?
所以,到目前爲止,我已經得到了代碼,像這樣
'begin script
Option Explicit
Dim valUserIn
Dim objShell, RegLocate
Set objShell = WScript.CreateObject("WScript.Shell")
RegLocate = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable"
objShell.RegWrite RegLocate,"0","REG_DWORD"
WScript.Sleep(1000)
valUserIn = Inputbox("Enter the Proxy server you want to use.","Proxy Server Required","proxygate.mydomain.com:8080")
if valUserIn = "" then
RegLocate = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable"
objShell.RegWrite RegLocate,"0","REG_DWORD"
'MsgBox "No proxy mode"
else
RegLocate = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer"
objShell.RegWrite RegLocate,valUserIn,"REG_SZ"
RegLocate = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable"
objShell.RegWrite RegLocate,"1","REG_DWORD"
'MsgBox "Proxy mode: " & valUserIn
end if
WScript.Quit
'end script
但這只是集的代理服務器的IP和端口。
在此先感謝..
訣竅:)。非常感謝 – user3104255