bobheart Posted June 25, 2004 Posted June 25, 2004 Using the URLDownloadToFile can it read from say a ini file from the web site and then load the info into a listbox /edit box ? Liked to make a little program that if I have some software and I update it they click on the gui and it checks the ini file on a server and would say "No updates or yes version 10.2.20 is new click download to download the new file . Can it be done ? think i would be able to do it ?
Magarine-Mann© Posted June 25, 2004 Posted June 25, 2004 (edited) just try this: $pc_ini = "C:\Programs\your_program - updater.ini" ;This would be the ini, which already exists on your PC $inet_ini = @TempDir & "\Your-File.ini" ;This would be the one out of the I-Net URLDownloadToFile("http://www.thiscouldbeyourserver.com/andthisyour.ini", $inet_ini) $your_version = IniRead($pc_ini, "Program", "Version", "MISSING") $inet_version = IniRead($ini, "Program", "Version", "MISSING") If $your_version = $inet_version Then MsgBox(0, "Update...", "A new version is available. Trying to download." $download_folder = @DesktopDir & "\new-version.exe" $update_download = URLDownloadToFile("http://www.thiscouldbeyourserver.com/PROGRAM.EXE", $download_folder) MsgBox(0, "Finish", "The File has been downloaded to " & $download_folder) Else MsgBox(0, "Update...", "No new version available. Closing program.") EndIf FileDelete($inet_ini) [code=auto:0] I hope this would work, ... I was sitting on a Mac while writting this, so I hadn't the chance to check, but I'm sure you will understand how it would work Edited June 25, 2004 by Magarine-Mann©
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