Jump to content

Online updates for your program

Recommended Posts


Updates for your program.

Hello a few days ago I started with the task of hosting my program on a host, in order to launch updates from there, thanks to the help I received in the forum I did and now I want to share how my code was.
First I did it verifying the version and opened the download page in the default browser, today what I did was a new version in which you download the file from a window with a progress bar and it automatically starts with the installation, it means that it does not open a browser but downloads directly with InetGet (). I know it will not be an expert's code, but maybe someone will help you. I do not speak English so I use Google translator, I mention this in case some things are poorly translated.  :sweating:


And this is the function with which everything is done.


Func _actualizacion()
   Local $iPing = Ping("www.google.com", 3000)

   If $iPing Then

      Local $dData = InetRead("https://sourceforge.net/projects/sala-de-videos/files/Version.txt")
      Local $iBytesRead = @extended
      Local $sData = BinaryToString($dData)

      If $version<$sData Then
         $update1&="Hay una versión más reciente del software"&@CRLF
         $update1&="Desea descargarla?"&@CRLF
         $update=MsgBox(4, "Update", $update1)
            Local $parte1= Run("Update.exe")
         MsgBox($MB_SYSTEMMODAL, "Update", "Usted cuenta con la última versión actualizada.")

      MsgBox(16, "", "No hay conexión a internet error: " & @error)

EndFunc   ;==>Example

It is noteworthy that the versions of the software and every time I do an update I host them in https://sourceforge.net/ so luck for those of us who are starting in this.


En español para algunos que lo necesitamos

Actualizaciones para tu programa.


Hola hace unos días empecé con la tarea de alojar mi programa en un host, con el fin de lanzar actualizaciones desde allí, gracias a la ayuda que recibí en el foro lo hice y ahora quiero compartirles como quedó mi código.

Primero lo realicé verificando la versión y abría en el navegador predeterminado la página de descarga, hoy lo que hice fue una nueva versión en la que descarga el archivo desde una ventana con una barra de progreso y automáticamente empieza con la instalación, quiere decir que ya no abre un explorador si no que descarga directamente con InetGet(). Sé que no será el código de un experto, pero quizá a alguien le sirva como ayuda. No se hablar inglés así que uso Google traductor, esto lo menciono por si algunas cosas quedan mal traducidas.

Es de resaltar que las versiones del software y cada vez que hago alguna actualización las alojo en https://sourceforge.net/ así que suerte para los que estamos empezando en esto.




Share this post

Link to post
Share on other sites

Hi I am trying to add this to my code and I have changed the info but there is a popup that has like 8 options after the new file is downloaded - where is that coming from??

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

  • Similar Content

    • gahhon
      By gahhon
      #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=..\..\Downloads\ALlogo.ico #AutoIt3Wrapper_Compile_Both=y #AutoIt3Wrapper_UseX64=y #AutoIt3Wrapper_Res_HiDpi=y #AutoIt3Wrapper_Run_Au3Stripper=y #Au3Stripper_Parameters=/so /rm /pe #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** I found out that a lot of sources provided by AutoIT members like what I am recently using is the Metro UDF.
      On top of it, it always written the Region of code and red color. Then it also assign some value into some variable.
      May I know, what are their use and what is the purpose of doing?
      If I remove them, will affect the application?
    • gahhon
      By gahhon
      I don't find any relevant topic via Google Search. Please kindly advise how to read and update data in Google SpreadSheet.
      Thanks a lot.
    • gahhon
      By gahhon
      While Not _Login() _Initial_Check() WEnd Func _Login() Local $FLAG_LOGIN = _Password_Check() If @error = 1 Then _Close_Application() ElseIf @error = 2 Then _Metro_MsgBox(0, "", $FLAG_LOGIN) Return False Else ; $FLAG_LOGIN return TRUE _Metro_MsgBox(0, "", "Access granted!") Return True EndIf EndFunc  I do have a question regarding the While Not Loop.
      According to the code I post above, While Not _Login() is similar to While _Login() = False right?
      Which mean when _Login() return False and it will execute the _Initial_Check() function, but somehow the logic is not right and I also don't understand why While Not _Login() loop is executed as expected.
      What I wanna achieve is when _Login() is not success, which mean return False then it continue loop the _Login() function until it return True
      When It return True only execute the _Initial_Check() function.
      Please kindly clarify. Thanks
    • gahhon
      By gahhon
      I would like to copy the entire folder with current directory @WorkingDir
      paste into either Program Files or Program Files (x86)
      Global Const $CUR_WA_FOLDER = @WorkingDir & "\Test Folder" Global Const $DIR_FOLDER = _ProgramFilesDir() _Initial_Check() Func _Initial_Check() If FileExists($DIR_FOLDER & "\Test Folder") = 0 Then Local $Decisions = _Metro_MsgBox(4, "", "Do you want to install Test Application?") If $Decisions = "Yes" Then DirCopy($CUR_WA_FOLDER, $DIR_FOLDER, 1) Else _Close_Application() EndIf EndIf EndFunc Func _ProgramFilesDir() Local $ProgramFilesDir Switch @OSArch Case "X32" $ProgramFilesDir = "Program Files" Case "X64" $ProgramFilesDir = "Program Files (x86)" EndSwitch Return @HomeDrive & "\" & $ProgramFilesDir EndFunc  
    • nooneclose
      By nooneclose
      Is it possible to use Autoit to find every Monday within a date range? An example would be I want to find every Monday between 1/9/19 through 4/9/19. Then Autoit would give me all the dates on which Monday lands between those two dates. 
      Sorry but I don't have any code so far. I was wondering if it was even possible. I read the help file and I didn't see a function that could do that.