I am working on a project, where I need to give a repair/remove option to my installer [which will be shown at installation time] if the program previously installed. And I need to do it with VS 2008. Please help me on that.
EDIT: Actually for some security reason I removing registry entry for previous installation. So that I can uninstall it from my application only, which is password protected. So thats why I need to customize that repair/remove option. So that it will appear by seeing some specific registry value. How can I do that ?
Thanks.
Just add a Setup project to your current solution. A setup project uses the Windows Installer technology which gives you the repair and remove option for free. Use this type of project when you have a "simple" installation. If you want more control (custom dialogs) you should install Wix. It plugs into VS and you can define an installation file in XML which is then compiled to a Windows Installer package.
I believe WIX is more suitable for your requirements where you have more control over your installer.
If you only want your application to be uninstalled only from your application, you can probably add a custom action (or Condition) in your installer which validates if the installer action (Repair/Remove) was launched from your application and not from ARP.
One way would to be pass a Custom Property from your application to the msiexec which is tested in your custom action (or Condition) and doesn't let the installer process proceed if executed without setting this property.
Related
I build my own Winform and packaging as msi installer with VisualStudio Installer project.
Installer works really well but there's a problem.
Currently I upload patch hourly because there's lots of bug to fix. so users who uses my winapp needs to run installer when updated.
When user runs my installer, on control panel, my program listed on there with each version like following image.
I wish to remove old version and keep newest version on the list.
How can I solve this problem?
This is my installer's property. and I manually config 'Version' property for control version.
Added : I keep RemovePreviousVersions as false because I wish to keep installer settings of "User Desktop Shortcut" and "User Programs Menu Shortcut"
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.
I am kind of new to Visual Studio and have found no solutions online, so this may be a simple problem nobody has bothered to post about.
I am working with a system that requires certain browser settings on a very specific version of Internet Explorer and am trying to create a launcher that can be installed on all users of a domain computer that establishes all these settings and creates a simple IE window (to dissuade people from using it more than needed).
I have written this application, but when I run the installer it a) gives me no option to change the install directory, and b) does not give me the option to change the default install directory in the project properties.
Other sources continue to say to change the 'Install Folder URL' to something else, but whenever I change it to say '\\localhost\c$\A_File_Directory', nothing ever changes and it continues to install in an unknown location.
Any help would be appreciated (perhaps a location with in-depth examples for VS)
EDIT -- It seems there is no way to do what I am looking for through Visual Studio, so I think I will be just deploying the ClickOnce installer through Group Policy so it can run on a per-user basis. Thanks to all who helped!
As of VS 2010 the ClickOnce Installer does not let you choose where to install the application. It controls that. I have found it rather irritating and if you really need to control where something is installed you need to use a different installer.
Here's another answer for VS 2012
Settting the ClickOnce installation folder URL in Visual Studio 2012
I had made project in windows application, now I want to add custom launch condition for SQL Server Compact 3.5.
Can it will done with registry search? can it will done with component id search?
and if yes then how please let me know.
If you are using Visual Studio Web installer packager you need to use custom action and try to find registry version
Try below
http://blogs.msdn.com/b/sqlservercompact/archive/2008/02/08/sql-server-compact-release-versions.aspx
I would suggest to go with Wix Installer, it gives you lot of flexibilty.
We are releasing a new version of our application and we would like it to be able to uninstall the previous installed version from the client's computer.
How would we be able to do that?
edit: I'm installing this application (and also the previous version) with a deployment project in Visual Studio, so I assume it is a Windows Installer.
Thanks a bunch!
Deployement Project in Visual Studio has a build-in feature to remove previous versions of your application.
Check the "RemovePreviousVersions" property in the Deployement Project Properties.
http://msdn.microsoft.com/library/y63fxdw6.aspx
Edit:
from MSDN:
The installer checks UpgradeCode and
ProductCode properties to determine
whether the earlier version should be
removed. The UpgradeCode must be the
same for both versions; the
ProductCode must be different.
If your using batch or another automated deployment tool for your releases, you can easily uninstall an MSI product using the following command line:
msiexec [/uninstall | /x] [Product.msi | ProductCode]
The Microsoft Installer (*.msi) format supports what you want do to, unfortunately Visual Studio only offers limited customisation and is designed to be used for basic projects.
There are a lot of resources out there on this topic and many other people asking similar questions. My best advice would be spent some time researching the MSDN documentation.
...
Update
OK. After spending 30 minutes reading a few articles, I think it may be possible using a custom action that you package with your new installer.
Follow this MSDN article on creating a Custom Action. It involves creating a new class library, adding an System.Configuration.Install.Installer class, adding it as an output to the setup project, and then selecting it as a custom action.
To view your custom actions tab, right-click on the setup project and select View > Custom Actions.
From here: you will need to write the code to remove the installation directory and AppData profile. This article on how to set Custom Action Data may be helpful.
Good luck.
HTH,
Dennis
If this you program then that's a simple reverse batch.
Or you could use some installer/uninstaller builder like NSIS