Dec 12th, 2013, 02:35 AM
[RESOLVED] Running an auto update via Windows Installer
I am fairly new with all of this. Applications deployment, in particular. Even worse, not too sure whether or not this is the right place to drop such thread.
Well, I have an application which will, essentially, need to be up-to-date at all times; having absolutely no tolerance for an outdated version to place an instance in my database. I am developing in VB.NET, VS 2010.
Currently, I've managed to have my desktop app checking for update(s) before its first form launches; once found, the app will throw a "Msgbox" telling the user that it's outdated and a "http" request will take place to download the new "setup" executable from via a web browser. Obviously, this will require from the user, at least, to go through the setup process over and over every time I trigger an update.
Is there any approach of placing a method in my form_load event (or any kid of a sub) by which the app:
1. Runs Windows Installer;
2. From within the installer, it downloads the new files (such as the .exe) from the Internet (the Web); and
3. Again, within the installer, it installs the new files.
Please bear in mind that I'm assuming that it's possible to run the Windows Installer by calling some sort of "classic" commands with parameters, such as the download link, and the setup parameters: an install directory, for example.
In short, I am trying to minimize the user's interactions with the update process (download & setup), if any, to the minimum, such that it's possible to have an updated copy ready for use once he fires up the application.
Please do advise in VB.NET, VS2010.
Last edited by M.ServerG; Feb 22nd, 2014 at 08:54 PM.
Dec 14th, 2013, 01:30 PM
Re: Running an auto update via Windows Installer
I found exactly what I was looking for, and I thought I'd share it with any of whom it may concern.
My mere "assumption" that there is, actually, a "method" of calling Windows Installer and passing to it some parameters (arguments), stands after all! Like I said, I "was" absolutely new to this.
All I needed is a reply with this answer.
Also, this explanation was very useful in my research.
Just for the record, I'll paste on here the piece of code because of which I'll mark this thread as [RESOLVED]. You may want to place it in your update method of your application.
Dim p as new process
p.StartInfo.FileName = "msiexec"
p.StartInfo.Arguments = "/i URLToYour.msi"
Last edited by M.ServerG; Dec 17th, 2013 at 06:35 AM.
Tags for this Thread
Click Here to Expand Forum to Full Width