Adding Custom prerequsites to visual studio setup project - installation

I have a setup project that I need to install a redistributable that is not available in the default prerequisite list. Is it possible to add this redistributable to the bootstrapper that the setup project creates?

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 up.

Take a look at Bootstrapper Manifest Generator tool (BMG) at http://code.msdn.microsoft.com/bmg
It is used for creating Bootstrapper packages and automatically adding them to Visual Studio's Prerequisites dialog box.
Edit: BMG can be downloaded from https://www.softpedia.com/get/Programming/Other-Programming-Files/Bootstrapper-Manifest-Generator.shtml now since the tool is deprecated apparently and is no longer located on Microsoft servers.

This can be solved by creating Custom bootstrapper package.Following link provides creation of it with a sample example
http://msdn.microsoft.com/en-us/library/ee726596.aspx

Related

Integrate advanced installer Merge Module project with Visual studio

I have some merge module projects created using advanced installer. I need to integrate them with visual studio. I have done same for MSI projects and they work fine. but I don't know how to achieve continuous integration for MSM using Visual Studio.
Advanced Installer extension for Microsoft Visual Studio allows to create Advanced Installer Projects for Visual Studio. Each such project is a container that can include a single .AIP file.
The Visual Studio Solution can include one or more Advanced Installer Project for Visual Studio, in accordance with your needs.
Note that you need to remove the default project that is created when adding a new Installer Project to the .sln and add the existing project, the project that builds the .msm package.
edit
Indeed, you are right. It was a misunderstanding on our end.
On my machine I have several extensions installed side by side. One of these extensions also supports the build of a merge module project type.
We do not officially support this yet. The option to build other project types (e.g. Merge Module Project, Updates Configuration Project) with our VS extension will be available in a future version of Advanced Installer. I will let you know when we will add support for this.
Until then, you can use a build event as a workaround to build the Merge Module Project within the Visual Studio project.
To build the .msm project you can use a command line as described below:
http://www.advancedinstaller.com/user-guide/command-line.html#build-project
The command line can be something as below:
AdvancedInstaller.com" /build "$(SolutionDir)Merge module sample.aip"

Mix local and download prerequisites in deployment project

According to the question Bundling only part of the prerequisites with ClickOnce a ClickOnce installer can either download ALL prerequisites from the web or expects ALL of the files locally. This seems to be the same for a Visual Studio 2008 deployment project.
As I would also prefer to include only selected prerequisites in an installer archive I was wondering if this is really still state of the art. Will upgrading to Visual Studio 2010 solve this issue or is there any workaround that I overlooked?
So here's an idea that I came up with.
Package the bootstrap installer with all prerequisites except the
.NET framework with "Download prerequisites from the component
vendor's web site" set
Create a small program (batch file or
executable) that is launched instead of the bootstrap installer which
does the following
Check if .NET framework is installed (the bootstrap package files tell you how to check this, e.g. .NET framework is installed if
HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5\1033\Install ==
1)
If yes execute setup.exe -homesite=false which configures the installer not to download any files
Execute setup.exe
Comments welcome!
You can package the prerequisite and set a download URL and put the prerequisite there. Then when the prerequisite is installed by the bootstrapper, it will download it from the URL instead of having to include it in the deployment package. This means, of course, that you have to set up your own bootstrapper package every time you want to do this, but it does work.

how to make a uninstall option in C# program?

i want to make a uninstall option in my C# program?
can u help for this?
and provide some code also
If you deploy your application via a Visual Studio Setup and Deployment Project, an uninstaller will come standard with the installation. It will be available in the Add/Remove Programs of the control panel.
You can create an installation project which will automatically add support for uninstallation. Under Other Project Types you have Setup and Deployment. There is InstallShield LE and Visual Studio Installer. If you choose Setup Project under Visual Studio Installer project, you will have uninstall as part of the built project.
see this video
http://www.youtube.com/watch?v=Z-xFLltALg0
If you want the executable to remove itself. aka self-destruct. Check out this blog http://blog.pedroliska.com/2010/05/20/c-self-destruct-windows-app/

Setup project, SQL compact 4 prerequisites

I have created a setup project in my application in order to include SQL compact 4 in the installation, as a prerequisite downloadable at the vendor's site (microsoft). I did everything thourg Visual Studio 2010 console (with SP1).
Now, when I try to install the package, the setup doesn't realize that SQL compact is installed. Why?
I don't want to use any other form of private deployment like copying the dlls and including them into my project. Thanks!
Most likely the prerequisite is not configured correctly. Try creating your own custom prerequisite.
Visual Studio setup projects do not support custom prerequisite creation. However, it can be done by manually generating the required manifests.
These manifests can be generated automatically with the Bootstrapper Manifest Generator tool.
After generating the package manifests, you can add all these files (including the package) in a separate folder in the Visual Studio prerequisites folder, for example:
C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages
This way you can see your custom prerequisite when clicking Prerequisites button in your setup project properties page.
To detect SQL Server Compact 4 you can search for this registry entry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v4.0\ENU\DesktopRuntimeVersion

Registering dll's in the GAC using Visual Studio Installer

I want to register/unregister my project's assemblies in the GAC using Visual Studio's Setup installer project.
I am thinking of using a custom installer to utilise the Install() and Uninstall() methods to write commmandline (in code) commands via the gacutil.exe.
Is there an easier way - or is this the way you would do this? Please keep responses within the scope of using Visual Studio tools (not Installshield or WISE etc)
Cheers.
You cannot rely on gacutil.exe, it will not be available on the target machine. Only machines that have the Windows SDK installed have it. The Visual Studio Setup project supports registering assemblies in the GAC without any custom tool. Right-click "File System on Target Machine" and select "Global Assembly Cache Folder".
You can install assemblies to the GAC by adding a Global Assembly Cache folder as part of the destination file system.

Resources