One of the great things about most system utilities is their portability. Many simply are distributed directly as an exe or in a zip file and are ready to use with no install required. Because of the simplicity of use, these types of applications are easily updated, however many lack any form of auto-update capability. Our UpdateFromWeb script solves this problem as it makes installing updates to portable applications, or any file available via the web for that matter, an automated process.
The UpdateFromWeb script usage is pretty simple and we have provided several examples below. You simply provide the source URL and the directory where the files to be updated on your computer are located and the script does the rest.
- Universal – works for any tools or files on any URL
- Directory scanning for updating all applicable files in a local directory (including subdirectories)
- Automatic unzipping and extraction
- Direct URL downloads for single file updates
- Case conversion for websites where URLs are case sensitive
- New file detection for only updating newer versions
- Automatic shutdown and restart of running applications which need to be updated
- Can be run on demand or automated
There are more features included which are documented in the script file. Just open it in Notepad (or any other text editor) to view all the options.
The UpdateFromWeb script makes use of a couple of external tools which will need to be on your system prior to use. The download links for these tools are provided below and need to be placed in a folder in your system’s PATH variable (if in doubt, just put these required files in C:\Windows).
Not Just for Tools or Applications
As mentioned above, the UpdateFromWeb script can be used for any file which has a consistent URL. For example, if a project is updated nightly using the URL mysite.com/project.zip, you can use the UpdateFromWeb script to automatically download and extract the zip file to a local folder on your machine.
On a similar note, you can use the script to keep files and/or tools consistent across multiple machines. Just upload a file to a central location and an automated process running UpdateFromWeb can handle the rest.
The UpdateFromWeb script can be both used from the command line or hardcoded. Additionally, you can mix and match as needed.
Below are some examples which demonstrate the usage as well as the respective execution settings for both the command line and hardcode.
Update all SysInternals tools located in “C:\My Tools” and restart any running applications which were updated:
UpdateFromWeb /U:http://live.sysinternals.com/tools /D /R “/T:C:\My Tools”
SET TargetDir=C:\My Tools
Update all Nirsoft tools located in “C:\My Tools” and all subdirectories:
UpdateFromWeb /U:http://www.nirsoft.net/utils /D /S /Z /L “/T:C:\My Tools”
SET TargetDir=C:\My Tools
Update the file named “Specs.doc” from mysite.com and copy it to “C:\Files\Latest Specs.pdf”:
UpdateFromWeb /U:http://mysite.com/Specs.pdf “/F:Latest Specs.pdf” /T:C:\Files
SET FileToGet=Latest Specs.pdf
Update the files in the “C:\Files” directory with latest files from Specs.zip on mysite.com:
UpdateFromWeb /U:http://mysite.com/Specs.zip /D /N /Z /T:C:\Files
Update all files in the “C:\Files” to be in sync with the files stored on mysite.com/files:
UpdateFromWeb /U:http://mysite.com/files” /D /T:C:\Files