What I mean is something like the installers for Visual Studio, where the installer is a very small application, which in turn downloads the actual application. What I'm trying to achieve is to have more control over installations - If we release a new version - we want all installations to be of the new version (as opposed to a regular installer which will install the same version no matter when it's used).
I know of Clickonce but that installs a program for one user only.
Is there some standard way of doing it? Is there some template for it? I'm not looking for any 3rd party software. I'm looking for a standard way of coding this or something in Visual Studio / any other Microsoft technology.
This isn't tested, but could you call msiexec? It takes a remote URL as a valid location for your msi file. I found a couple articles that may be helpful regarding this:
Says it is possible to do: http://msdn.microsoft.com/en-us/library/aa368328(v=vs.85).aspx
This answer has the C# code to do it using the windows installer COM object: Programatically installing MSI packages
Answer snippet from the question: using System; using WindowsInstaller;
namespace TestApp
{
public class InstallerTest
{
public static void Install()
{
Type type = Type.GetTypeFromProgID("WindowsInstaller.Installer");
Installer installer = (Installer)Activator.CreateInstance(type);
installer.InstallProduct("YourPackage.msi");
}
}
}
If you need to add switches to the installer or deploy a .msp upgrade when you update your version, here is the full blown model:
http://msdn.microsoft.com/en-us/library/aa369432%28v=VS.85%29.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With