Jump to content
Sign in to follow this  
XanzyX

Using InetGet to dowload an unknown file name from the same link

Recommended Posts

DW1

I'm sure a regex guru can come along and make a nicer, proper regex for this, but this is grabbing the links for me.

This should grab the recommended downloads for premium security (trial and paid)

#include <Inet.au3>
#include <Array.au3>

Local $sURL = 'http://www.avg.com/us-en/download.prd-isi'
Local $sSource = _INetGetSource($sURL)
Local $aRegEx = StringRegExp($sSource, 'a href="(.*\.exe)"(?:.*\R){0,5}.*Recommended', 3)
_ArrayDisplay($aRegEx)
  • Like 1

Share this post


Link to post
Share on other sites
XanzyX

The link stays the same, always. What comes from the link is different

Share this post


Link to post
Share on other sites
Palestinian

You can try what DW1 suggested, you can also try this:

#RequireAdmin
#include <InetConstants.au3>

InetGet("http://www.avg.com/us-en/download-file-dm-triisi.tpl-stdfull","D:\setup.exe")

It worked for me.

You don't actually need the #include <IE.au3>, I accidentally forgot it there.

Edited by Palestinian

Share this post


Link to post
Share on other sites
XanzyX

Thanx guys.  I had to go home to see if it worked and it did.

Share this post


Link to post
Share on other sites
XanzyX

I really hate being a jerk but I saw your examples and implemented them successfully.  Thank you again.

Part 2 of my application entailed downloading all of the virus updates for all Windows versions from this link ----> http://free.avg.com/us-en/download-update#tba1 

The links are not always the same label and the file names are not always the same file name.  I have tried adjusting your examples for this part to no avail. Can you please help me with this as well?

Thank You

Share this post


Link to post
Share on other sites
XanzyX

I Think it would be best to post a new thread

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.