Settings in visual studio setup project - c#

I am working on the Setup Project (msi installer package creator) of a C# desktop application in Visual Studio 2010. I want to add some product activation conditions based on radio buttons in the setup project. I have added a user interface in setup project containing the radio buttons, but i don't know where to get the selected value from this interface, or where is this selection stored.
Image Radio Buttons
User Interface

You can't run code on the button click of a dialog in a Visual Studio setup's MSI. Other tools (InstallShield, WiX, Advanced Installer etc) offer support for all Windows Installer functionality, but Visual Studio setups do not. Those tools let you run a custom action on a button click to validate the input, for example.
So your question is the nearly the same as these:
c# setup project get radio buttons value
How to code for Custom Dialog in Setup Project?
so basically you can pass the values to a custom action. However if you somehow want to change the course of the install based on the choice in the radio buttons there is not much you can do because all VS custom actions run at the end after everything is installed. It might be better to defer all this until the app first runs, and have the app deal with this. I assume that a user might want to upgrade from Demo to Student to Professional without re-installing the product.

Related

Add a custom action on uninstall in Visual Studio 2017 setup project

I have a C# application (winforms) and I'm trying to create a setup project for it, with the following customization: when the user tries to uninstall the application, I want to show a simple dialog with 2 textboxes (email and password) and one button. When the user presses the button, I want to make a request with those credentials and, if they are valid, I want to uninstall the app.
Now, I installed this extension for Visual Studio 2017 that gives me the Setup Project template.
I know that I have to deal with Custom Actions. I actually reached that screen:
But when I click on Add Custom Action, it wants me to upload a script or an executable file.
My problem is: what kind of executable / script do I have to put there? There is a special language built for this installer? Or I can just write C#?
I haven't found any kind of updated documentation on this topic except this one that works for Visual Studio 2010, but I need it for Visual Studio 2017.
Thank you respectfully.
This item template is available in 2017 also.
Create a separate Library project. Add there a new installer item and continue as it is said in the manual you've found

How to link two dialog boxes into an installer projects ( c# - VS 2013)

I'm working on Visual Studio 2013, with the add-on Visual Studio Installer Projects.
I have created a setup projet ( "MySetup" ) to install few personal components into a customer's PC. I want to let the possibility to the operator to choose the components he will want to install.
I want a first dialog box with two options :
Install all components
I want to choose one by one
And, if the operator choose the second option, I want display a second dialog box :
component 1
component 2
...
But, for the moment, if I put the two dialog boxes into my setup project, the second one is displayed all the time.
I don't know how to control the display of the second dialog box according to the choice of the first one.
I searched into microsoft documentation, but I didn't find anything:
How to: Add and Remove Installation Dialog Boxes in the User Interface Editor
How to: Customize Installation Dialog Boxes in the User Interface Editor
There's no support for custom dialogs in a Visual Studio installer project, just the canned dialogs that can be added. There is also no support for conditional dialogs based on previous dialog content, nor running code when dialog buttons are clicked. Visual Studio setup projects don't offer the full range of Windows Installer capabilities when compared to WiX, InstallShield, Advanced Installer and others.
You'll see some articles (Code Project I believe) about going into the raw dialog files with tools such as Orca to change the format and flow of dialogs but you'll be in there with the raw MSI tables.
If you have seen other installs where the user gets to choose what's installed and can also go into maintenance mode later to change what's installed, this is always done with features, and I use this word because "component" has a specific meaning in windows installer, as does "feature".

How to provide options and control for Custom and complete installation in VS installer UI

I have an Windows C# application for which I will have to create an installer
which would ask user for custom and complete installation.These custom and complete installation options are same application with different feature.
I know to provide options by using Installer UI radio buttons but how to provide control as it takes specific exe for the custom and complete installation respectively.
Or is there any way to achieve this, appreciate if you would provdie step by step procedure.
I am using Visual studio 2013 premium version, MySQL 5.5.
You have different ways, you can do it by configurate in VS. But on this I canĀ“t say much. I would prefer to use a NSIS-File or MS-Build to create an setup.exe
With NSIS you can say all Options etc. which the installer should include.
Here is an NSIS tutorial. Hope that helps.
There is no support for custom dialogs in Visual Studio setup projects - they are limited feature setup projects that do not supply access to the full functionality of Windows Installer. Any installs you see with those Custom and Complete choices (or choices of which features to install) will not have been built with Visual Studio setup installer projects. That means you'll need to choose another tool that meets those requirements, and any others you might have for the install.

New Xamarin Shared Project creation gives errors on Visual Studio 2015

I have Visual Studio Enterprise 2015, with all updates and patches applied. When I build create a new Visual C# project Templates->Cross-Platform->Blank App (Xamarin.Forms Shared) I get the following error:
A problem was encountered creating the sub project '.Windows'. This project requires a Visual Studio update to load. Right-click on the project and choose 'Download Update'.
When I click Ok, a solution and projects are created but there is no .Windows, so I cant right click on it! If I try add the project then I get the same issue.
I would expect that such a simple use case should work out the box. I can find a few workarounds via Googling but I don't want to hack around with projects before I even write a line of code of my first Xamarin application.
Any ideas on what I need to do to get the project creation working properly "out of the box"?
A second puzzler is that the template creates a .WinPhone folder that is empty, should I have a csproj in it?
Close Visual Studio and try to modify it components (Control Panel -> Uninstall a program -> Microsoft Visual Studio -> click on it).
In opened window click on "Modify".
Then find and select "Windows 8.1 and Windows Phone 8.0/8.1 Tools" (in Windows and Web Development)
Then click on "Update".
also make sure the Hyper-V is enabled :
Control Panel -> Uninstall a program, then in left menu "Turn Windows Features on or off" and find "Hyper-V", if it isn't selected, select it and click "ok".

Create Custom Installer through Visual studion 2012 in c#

Hi,
I have to create one installer as shown in picture. I have tried with visual studio installer template and I have seen that there is one installer class also. But It's not giving same design as shown in my picture.
When user will click on install button on that time it should install project and other button it will document.
Hope I'm clear with my requriement.

Categories