Sign in to follow this  
Followers 0
Necromorph

Sliently Download SQL package

2 posts in this topic

#1 ·  Posted (edited)

im trying to automate the install of sql express 2008, but i don't want to bundle 2 versions of the installer in my app (x86 and x64) so i have the links for both but i want to silently download them, and i cannot find a good way to do it, here is what i have

#include<GUIConstants.au3>
#include<EditConstants.au3>
#include<WindowsConstants.au3>

$osArchitecture = @OSArch
    If $osArchitecture = "X86" Then
        $dlPackage = "http://go.microsoft.com/?linkid=9729746"
    Else
        $dlPackage = "http://go.microsoft.com/?linkid=9729747"
    EndIf

GUICreate("PalMateERP® SQL Installer", 300, 125)
GUISetState()

GUICtrlCreateLabel("SQL Instance Name", 25, 25)
    GUICtrlSetBkColor(-1, $gui_bkcolor_transparent)
$inputInstanceName = GUICtrlCreateInput('PALMATE', 25, 40, 250)
$buttonOK = GUICtrlCreateButton("OK", 125, 75, 75)
$buttonCancel = GUICtrlCreateButton("Cancel", 200, 75, 75)

While 1
    $msg = GUIGetMsg()
    Switch $msg
        case $gui_event_close, $buttonCancel
            Exit
        case $buttonOK
            ShellExecute($dlPackage)
    EndSwitch
WEnd

and using ShellExecute prompts for the save dialog blah blah blah, i just want it to save in a temp file, ill run it, install it, then i want to delete it. thanks for the help.

Edited by redLabel

Share this post


Link to post
Share on other sites



InetGet() worked for me on the x86 file (didn't try the x64 download)...I'm assuming IE is installed. It can be used in background mode or you can make the script wait for download to complete before continuing.

If in background mode, use InetGetSize() to find out how big the file is, in bytes, before you start the download. Then use InetGetInfo() at intervals to determine how much has been download, should you need to display this info on-screen...for instance, if you want to use your own ProgressBar.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0