Vbscript 使用VB脚本安装Flash

Vbscript 使用VB脚本安装Flash,vbscript,flash,Vbscript,Flash,编剧 我是VB脚本世界的新手 我想通过编写脚本来完成以下工作,以便安装Flash 这些步骤是:- 1. Open Internet Options. 2. Click on “Connections” tab. 3. Click on “LAN Settings” button. 4. Deselect the “Automatically Detect Settings” checkbox. 5. Check the “Use a proxy server for your LAN

编剧

我是VB脚本世界的新手

我想通过编写脚本来完成以下工作,以便安装Flash

这些步骤是:-

1.  Open Internet Options.
2.  Click on “Connections” tab.
3.  Click on “LAN Settings” button.
4.  Deselect the “Automatically Detect Settings” checkbox.
5.  Check the “Use a proxy server for your LAN (These settings will not apply to dial-up or VPN connections).” checkbox.
6.  Enter the address “172.16.3.150” in the “Address” text field and “80” in the “Port” text field.
7.  Check the “Bypass proxy server for local addresses” check box.
8.  Click “OK”, and “OK” again.
9.  Open “Internet Explorer” and navigate to “http://aihdownload.adobe.com/bin/install_flashplayer11x64ax_gtbd_aih.exe”
and open the file.
那么,有没有可能在一个脚本中实现这一切呢?我想在GPO中使用它在所有客户端桌面上运行


我感谢你提供的任何帮助!多谢各位

您不需要IE及其gui在代理服务器后面发出http请求。您可以使用对象下载文件(带有代理信息,请参阅)。
例如

Const HTTPREQUEST_PROXYSETTING_PROXY = 2
Const adTypeBinary = 1
Const adSaveCreateOverWrite = 2
Dim oHttp

Set oHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")
With oHttp
    'Make request
    .SetTimeouts 5000,5000,5000,30000
    .SetProxy HTTPREQUEST_PROXYSETTING_PROXY, "172.16.3.150:80"
    .Open "GET", "http://aihdownload.adobe.com/bin/install_flashplayer11x64ax_gtbd_aih.exe", False
    .Send
    If oHttp.Status = 200 Then
        'Save Response
        With CreateObject("ADODB.Stream")
            .Open
            .Type = adTypeBinary
            .Write oHttp.ResponseBody
            .SaveToFile "C:\setup.exe", adSaveCreateOverWrite
            .Close
        End With
        'Run Executable
        CreateObject("WScript.Shell").Run "C:\setup.exe"
        WScript.Echo "Completed!"
    Else
        WScript.Echo "Download Failed"
    End If
End With
Set oHttp = Nothing