Visual Studio 2017 Installer Project – include VC++ 2015 Redistributable

You can’t run that redistributable as a custom action because it’s an MSI-based install, and you cannot run recursive MSI installs (yours calling the VC redist one). In Visual Studio setup projects you’re supposed to use the Prerequisites feature. Right-click the setup project in Solution Explorer, choose Properties, then Prerequisites. This will build a setup.exe … Read more

In-use files not updated by MSI-installer (Visual Studio Installer project)

We had this problem, and the solution we came up with was to create two apps; the user app and an updater app. The MSI installs both. Each app checks if the other needs updating and, if it does, closes the other app, downloads the other app’s updater, runs it, then relaunches the other app. … Read more

How to install a windows service programmatically in C#?

I found several errors in the code that you reused and have fixed these and also cleaned it up a little. Again, the original code is taken from here. public static class ServiceInstaller { private const int STANDARD_RIGHTS_REQUIRED = 0xF0000; private const int SERVICE_WIN32_OWN_PROCESS = 0x00000010; [StructLayout(LayoutKind.Sequential)] private class SERVICE_STATUS { public int dwServiceType = … Read more

Adding Custom prerequsites to visual studio setup project

I figured out how to add Custom Prerequisites to the Visual Studio prerequisites dialog box. MSDN as a good article on creating the prerequisite. Basically you just have to create a product manifest and a package manifest, copy them along with your distributable file to : \Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages. Visual studio will automatically pick it … Read more