- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 2# vesperlee
À°§Aª¦¤å¤F ->§Þ³N¤å¥ó¡Chttp://technet.microsoft.com/zh-tw/library/ff699052.aspx
°õ¦æVBA ªºµ{§Ç«á,¦pn¨ì IE¬d¬Ý[³s½u]³]©wªº§ïÅܮɳ£¶·«ö¤U¨C¤@¤lµøµ¡ªº[½T©w]Áä , ·í¦A¦¸ªº°õ¦æ VBA ªºµ{§Ç§@§ïÅܤ~·|¦³§@¥Îªº- Option Explicit
- Const HKEY_CURRENT_USER = &H80000001
- Sub proxyÃö³¬()
- '»Ýק諸³¡¥÷ proxy.hinet.net:80 (¥]§tPort)' ,1¬°P¯à¡A0¬°°£¯à
- ProxySettings "proxy-n1.google.com.tw:3125", 0
- End Sub
- Sub proxy¥´¶}()
- '»Ýק諸³¡¥÷ proxy.hinet.net:80 (¥]§tPort)' ,1¬°P¯à¡A0¬°°£¯à
- ProxySettings "proxy-n1.google.com.tw:3125", 1
- End Sub
- Public Sub ProxySettings(ByRef strAddress As String, ByRef intSwitch As Integer)
- Dim strComputer As String, objRegistry As Object, strKeyPath As String, strValueName As String, dwValue As Integer, strValue As String
- strComputer = "."
- Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
- strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings"
- strValueName = "ProxyEnable"
- dwValue = intSwitch
- objRegistry.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, strValueName, dwValue
- strValueName = "ProxyServer"
- strValue = strAddress
- objRegistry.SetStringValue HKEY_CURRENT_USER, strKeyPath, strValueName, strValue
- strValueName = "ProxyOverride"
- '5.ªº¤º®e {§t¦³¤U¦C°_©l¤å¦rªº¦ì§}¤£¨Ï¥ÎProxy}
- strValue = "MyTest...." '¼g¤J¦ì§}
- 'strValue = "<local>" '²M°£¦ì§}
- objRegistry.SetStringValue HKEY_CURRENT_USER, strKeyPath, strValueName, strValue
- End Sub
½Æ»s¥N½X |
|