Sign in to follow this  
Followers 0
bobheart

Could someone

11 posts in this topic

Someone write a script that will download the most recent unstable version and install it ..

Thanks ..

Share this post


Link to post
Share on other sites



why don't you do it Bob? I'm guessing you're of a decent enough skill level to do one. :D

Though it would be nice to see that as a button in Autoit menu to do a "update autoit" function.

moo

Share this post


Link to post
Share on other sites

Sorry, I'm no way that good .. but yes it would be nice to have an autoit update button ..

Share this post


Link to post
Share on other sites

Sorry, I'm no way that good .. but yes it would be nice to have an autoit update button ..

It can be done in like 5 lines or less...

Share this post


Link to post
Share on other sites

It can be done in like 5 lines or less...

Cool .. show me .. :D

Share this post


Link to post
Share on other sites

Just try, we're all here to help you along the way :huh2:

Have faith :D

moo

Share this post


Link to post
Share on other sites

Thats ok i don't need it that bad .

Share this post


Link to post
Share on other sites

ok, I was already thinking of doing this. and while I could do it in under five lines, I've decided to make it more complicated, here's what I came up with in the last 20 minutes, I'm going home, but if anyone has any other settings or options that they'd like to see in the script, let me know. the idea being that the first time you use it, it makes the INI, after that, it's silent.

;download and update latest unstable of autoit
;the first time you run it, it'll ask for your preferences.

if fileexists("update.ini") =0 Then
   $download = InputBox("AUTOIT URL", "Paste the URL for the autoitunstable url that you'd like to download." & @LF & "(include the http://)", "http://www.autoitscript.com/autoit3/files/unstable/autoit/autoit-v3.0.102.exe")
   $targetfolder = FileSelectFolder("Target directory for Autoit download","", 1)
   $installdir = FileSelectFolder("Directory to install Autoit in","",1)
   if MsgBox(4, "Overwrite previous version?", "Do you prefer to overwrite the previous version, or install fresh?" & @LF & "Yes to Overwrite and keep your settings") = 6 then
      $overwrite = 1
   Else
      $overwrite = 0
   EndIf
   IniWrite("update.ini", "PREFS","overwrite", $overwrite)
   IniWrite("update.ini", "LOCAL","installdir", $installdir)
   IniWrite("update.ini","LOCAL","folder", $targetfolder)
   IniWrite("update.ini","NET","download", $download)
   
Else
   $overwrite = IniRead("update.ini", "PREFS","overwrite")
   $installdir = IniRead("update.ini", "LOCAL","installdir")
   $targetfolder = IniRead("update.ini","LOCAL","folder")
   $download = IniRead("update.ini","NET","download")
EndIf

$filename = $targetfolder & "\" & StringTrimLeft($download, StringInStr($download,"/",0,-1))
URLDownloadToFile($download, $filename)
;I could just do a /S to do a silent install, but that sounds too easy. unless there's command line options for the setup's options, like file defualts and overwriting the current install?

"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

Well it ran fine the first time but when I ran it again it errored out . don't remember what it said now .

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