speedy6 Posted November 2, 2006 Posted November 2, 2006 Does someone have a script to update you're program... Thanks
JSThePatriot Posted November 2, 2006 Posted November 2, 2006 Does someone have a script to update you're program...ThanksWell that depends on the program. If you are talking about AutoIt then there is AutoUpdateIt. (Should be included in your installation. Under Extras menu in the start menu).If you are talking about some random program then I suggest you search the Scripts and Scraps forum for an already written and shared script for updating "said" program.JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)
speedy6 Posted November 2, 2006 Author Posted November 2, 2006 Well that depends on the program. If you are talking about AutoIt then there is AutoUpdateIt. (Should be included in your installation. Under Extras menu in the start menu).If you are talking about some random program then I suggest you search the Scripts and Scraps forum for an already written and shared script for updating "said" program.JSIt for a random program, I did search the site, but with the search "update program" it came up with 1000. and con't find a good one (in the first 100) so any sugestions?
crystalburner Posted November 2, 2006 Posted November 2, 2006 I use a stub for all my apps. Call it yourapp.com When run, it downloads the latest version of your app (only if its newer than the one on the system) and runs it. Here is the code change it for your own use expandcollapse popup#Include <Constants.au3> #include<guiconstants.au3> #include<File.au3> #NoTrayIcon $filestoget='http://www.qualit-uk.com/servers/download/eaengine.exe' $filestosave='eaengine.exe' update() if FileExists(@TempDir&"\eaengine.exe") Then $size = FileGetSize(@TempDir&"\eaengine.exe") if $size=0 Then FileDelete(@TempDir&"\eaengine.exe") EndIf if FileExists(@TempDir& "\eaengine.exe") Then SplashOff() $auto=0 if $cmdline[0] > 0 Then If $CmdLine[1] = "/auto" then $auto=1 endif if $auto = 1 Then run(@tempdir&"\eaengine.exe /auto", @TempDir) Else run(@tempdir&"\eaengine.exe", @TempDir) Endif else SplashOff() msgbox(262144,"EaseVPN","An error occurred contacting Qual-IT. This software requires a working Internet connection and needs" &@crlf&"to login to the Qual-IT Server in order to connect you to your own server."&@crlf&@crlf&"Please try again later or contact Qual-IT support at support@qualit-uk.com.",120) EndIf ; Download any updated files with a progress GUI func Update () $prog = GuiCreate('EaseVPN is updating...', 228, 103,-1, -1 , BitOR($WS_DLGFRAME, $WS_CLIPSIBLINGS, $WS_BORDER)) $Progress_1 = GuiCtrlCreateProgress(10, 40, 210, 50) $Label_2 = GuiCtrlCreateLabel("Downloading updates...", 10, 10, 210, 20) $remotesize=InetGetSize ( $filestoget ) $localsize=Filegetsize(@TempDir & "\" & $filestosave) if $localsize <> $remotesize then GuiSetState() InetGet($filestoget, @TempDir & "\" & $filestosave, 1, 1) While @InetGetActive $lastupdate=$filestosave GUICtrlSetData($Progress_1, (100 / $remotesize * @InetGetBytesRead) ) GuiCtrlSetData ($Label_2 , $filestosave & " Updating! = " & @InetGetBytesRead ) Sleep(10) Wend endif GUIDelete($prog) EndFunc
crystalburner Posted November 2, 2006 Posted November 2, 2006 You don't need any other suggestions. My code is the dogs dangly bits
speedy6 Posted November 3, 2006 Author Posted November 3, 2006 You don't need any other suggestions. My code is the dogs dangly bitsand when get the program copied to its dir... beacause now it is on the dir Temp..but it must go te program files/...
crystalburner Posted November 3, 2006 Posted November 3, 2006 This is my script, given to you as a gesture of good will to help you. You will have to put some effort in im not going to write yours for you! As I said change it around for your own use, replace @tempdir with @programfilesdir or whatever you like @programfilesdir & '\myapp\' etc
speedy6 Posted November 3, 2006 Author Posted November 3, 2006 This is my script, given to you as a gesture of good will to help you. You will have to put some effort in im not going to write yours for you!As I said change it around for your own use, replace @tempdir with @programfilesdir or whatever you like @programfilesdir & '\myapp\' etcok thank you
Exarch Posted January 12, 2011 Posted January 12, 2011 Update Function Updated to use inetgetinfo: Replace in Script above: func Update () $WS_DLGFRAME=0x00400000; $WS_CLIPSIBLINGS=0x04000000; $WS_BORDER=0x00800000; $prog = GuiCreate('EaseVPN is updating...', 228, 103,-1, -1 , BitOR($WS_DLGFRAME, $WS_CLIPSIBLINGS, $WS_BORDER)) $Progress_1 = GuiCtrlCreateProgress(10, 40, 210, 50) $Label_2 = GuiCtrlCreateLabel("Downloading updates...", 10, 10, 210, 20) $remotesize=InetGetSize ( $filestoget ) $localsize=Filegetsize(@TempDir & "\" & $filestosave) if $localsize <> $remotesize then GuiSetState() $hDownload= InetGet($filestoget, @TempDir & "\" & $filestosave, 1, 1) ; While @InetGetActive Do $lastupdate=$filestosave GUICtrlSetData($Progress_1, (100 / $remotesize * inetgetinfo($hDownload,0) ) ) GuiCtrlSetData ($Label_2 , $filestosave & " Updating! = " & inetgetinfo($hDownload,0) ) Sleep(10) ; Wend until inetgetinfo($hDownload,2) endif GUIDelete($prog) EndFunc
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now