Skip to content

Instantly share code, notes, and snippets.

@frah
Last active December 27, 2015 10:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frah/7313865 to your computer and use it in GitHub Desktop.
Save frah/7313865 to your computer and use it in GitHub Desktop.
プロキシの設定を有効化するVBScript
Option Explicit
Dim Excel, Com
Set Excel = WScript.CreateObject("Excel.Application")
Excel.Visible = False
rem HWND_BROADCAST = 0xffff
rem WM_SETTINGCHANGE = 0x001a
rem SMTO_NOMAL = 0x0
Com = "CALL(""user32"",""SendMessageTimeoutA"",""JJJJJJJN"",""0xffff""," _
& """0x001a"",0,0,0,1000)"
Excel.ExecuteExcel4Macro(Com)
Com = "CALL(""wininet.dll"",""InternetSetOptionA"",""AJJJJ"",0,"
rem INTERNET_OPTION_SETTINGS_CHANGED = 39
Excel.ExecuteExcel4Macro(Com & "39,0,0)")
rem INTERNET_OPTION_REFRESH = 37
Excel.ExecuteExcel4Macro(Com & "37,0,0)")
Excel.Quit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment