Sign in to follow this  
Followers 0
iamtheky

_IE dealing with auto prompts

6 posts in this topic

http://www.microsoft.com/en-us/download/confirmation.aspx?id=30225

navigating to the above link automatically prompts you to download the package, or you can cancel the initial prompt and click the link with the text "start download"

My script seems to be hanging after navigating to this site, I can only assume its because of the prompt.

Any assistance in downloading the package from this URL (and dealing with sites as such) would be greatly appreciated.

#include <IE.au3>

$oIE = _IECreate("http://technet.microsoft.com/en-us/security/Bulletin/MS12-048" , 0 , 0)
$oLinks = _IELinkGetCollection($oIE)

For $oLink In $oLinks
    If StringInStr($oLink.innerText, "Windows 7 for x64-based Systems Service Pack 1") Then
        $DwnLink = ($oLink.href)
        ExitLoop
    EndIf
Next

_IENavigate($oIE , $DwnLink)

$iURL = _IEPropertyGet($oIE, "locationURL")

$iURL2 = stringregexpreplace($iURL , "http://www.microsoft.com/en-us/download/details" , "http://www.microsoft.com/en-us/download/confirmation")

msgbox (0, 'replace' , $iURL2)

_IENavigate($oIE , $iURL2)

;---hangs

msgbox (0, '' , _IEPropertyGet($oIE, "locationURL"))

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites



$Surl = "http://download.microsoft.com/download/D/0/B/D0B91298-6130-4927-89E3-CEE9E2C47FC6/Windows6.1-KB2691442-x64.msu"
$name = "\Windows.msu"
InetGet($Surl, @DesktopDir & $name)


I feel nothing.It feels great.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Thanks that will certainly prove useful once i get past the hang as I could capture that link from the "start download" if I could read the page.

**Got it, had to winkill that prompt rather than do something useful with it

Edited by boththose

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites

You can capture the link without using the ie.

Anyway good luck


I feel nothing.It feels great.

Share this post


Link to post
Share on other sites

may i ask how? I am always up for improving.


,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites

hmmm i will not explain how i do it because you will not understand. I use http.

From the ready functions you maybe could use InetRead.

$link1 = InetRead("http://www.microsoft.com/en-us/download/confirmation.aspx?id=30225")
$bin = BinaryToString($link1)
ConsoleWrite($bin)

This return contains the download link of the file you want to download. You could use StringInString or another string function to find that link after the return.

In case i want to use IE function i personally prefere using ObjCreate("InternetExplorer.Application") non-visible so i can get informations i want from it. Much easier


I feel nothing.It feels great.

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