VS Setup Project: Uninstall other component on install - visual-studio-2005

I am creating a Visual Studio Setup project. I want to un-install another component from the system from the install of my component. The other component is installed from my own setup created using Visual Studio.
Currently when I am calling the un-install of the other component from the install action of the component I get the error code: 1618 (another MSI already running).
Could anyone suggest me an alternative way to solve this problem?

If you don't need to actually run the uninstall of the other component, you could use a Custom Action to remove files/folders you intend to replace.
Using a Custom Action will force you to do all the clean up actions the Uninstaller would do for you.
Is it that you're replacing something or are you just trying to uninstall something as a result of installing something entirely different?
MSDN Custom Action Walkthrough
I have also read a few articles from Phil Wilson that have been helpful with Custom Actions:
Phil Wilson on Custom Actions

I ran into a similar problem that required several installs to run together and could find no way to run MsiExec recursively. The solution I used was to bundle the installer with a script that would run MsiExec once to install/uninstall the old package, then again to run the new installer. Clients had to run the script to install.
If you find a better way, let me know.

I think you can run uninst.exe of that program through the shell command while setup starts.....

Related

Install Resharper Extension using PowerShell

We are looking at using PowerShell provisioning scripts for developer VMs and can install ReSharper via PowerShell, but I have not yet found anything on how to add the extensions for VS (currently hoping to add StyleCop) so that the developer experience is set up and configured as completely as possible without manual intervention.
Has anyone managed to achieve this?
I can give you a rough idea how to continue with that, since I've tried to achieve the same, but didn't have time to complete it:
Download ReSharper installer. Either via fixed URL, or parse the service output to get the latest version.
Generate a command-line invocation string. Similar to: installer.exe /VsVersion=12.0;14.0;15.0 /SpecificProductNames=ReSharper /Silent=True
Invoke the installer.
For plugins:
Download the plugin: https://resharper-plugins.jetbrains.com/api/v2/package/<packageName>
Extract to %localappdata%\jetbrains\plugins.
Adapt the config file in AppData\Roaming\JetBrains\ReSharperPlatformVsXX\XX
Reinvoke the installer.
I'm not 100% sure though about all of this. The second installer invocation might include an additional switch, but you should find out by manually installing a plugin, and checking with ProcMon.

Setup project always clean installation

I have a setup made by Setup Project for my application. Is there a possibility to make my setup not check for any installed versions of a product?
I want it to work in this way: whenever I open my setup I want it to do a clean install. I don't want to have any repair option, but I want it to allways overwrite the installed product.
Is there a possibility to achieve it in Windows Installer? Are there any properties I could change in Orca to achieve it?
Thanks a lot for any help!
You would need to stop registering the package with Windows Installer. To do that you need to remove the following standard actions from InstallExecuteSequence table:
RegisterUser
RegisterProduct
PublishFeatures
PublishProduct
Just so you know, this will also make the product to not be listed in Control Panel, list of install programs.

How to prevent running multiple instances of setup.exe created in installshield basic msi project?

I have created my application's setup in installshield - basic MSI project...
Now when i am installing it, it allows me to run .exe multiple times simultanious...
Please let me know, how can i stop it.....
There is already a safe guard automatically built-into Windows Installer. If two or more of your installs actually try to install only the first one will install. The others will throw a message saying another install is already in progress. This is enforced by the _msiexecute mutex.
If you want to gate the situation earlier, you'll have to write your own custom actions to create your own custom mutex, tear it down when the install is complete and check for it when starting the install. However, I'd mark this problem as Functions as Designed and move on.

Is it possible to run custom actions during uninstall using InstallShield 2009

I need to run a custom action during uninstallation of a ManagedCode which is a part of the installation (Before it is removed in the uninstall process)
Is it possible in Install Shield 2009?
Yes. You can run a ManagedCode custom action as part of the uninstall. You just need to sequences it in the Install Exec Sequence with a condition of REMOVE="ALL". InstallShield is just a wrapper around Microsoft's MSI technology, so many times it is best to go the MSDN for help understanding what you want to do. For example this entry should help you schedule your action, http://msdn.microsoft.com/en-us/library/aa371626(VS.85).aspx
At least in my IntallShield Express 11 I can have Custom Actions in Uninstall in several different places.

MSI Bootstrapping: External URLs

Much searching has lead me to find several descriptions of how to create a bootstrapping msi, but these solutions all assume the msi is local or a standard Windows component. Is there a way to make an msi that downloads an installer (which is also an msi) with normal MSI or Wix code rather than by having the bootstrapper execute some non-native program to do so?
My experience with msi's has been it's not possible to run 2 at the same time. (could be wrong though)
What I ended up doing was to instead make an installer exe using Inno Setup (http://www.jrsoftware.org) and ISTool (http://www.istool.org) which downloads and installs the various msi's. With ISTool it's very easy to do.
I know it's not as chic or sexy as Wix, but it worked for me very well.
I would create a custom action that runs in the InstallUISequence. This would download the MSI if necessary (to the source folder), and then try to launch it as a nested installation.
Windows prevents two installs from being in the InstallExecuteSequence at the same time, so if you're looking for a silent install solution with a bootstrapper, you're SOL.
However you can start another install from the UI sequence, which is probably an OK solution as long as you advise your customers that certain other dependencies must be installed first if they're going to deploy via group policy or some other 'silent' method.
If it helps, I'm pretty sure you can also call MSIEXEC with a URL, eg. msiexec.exe /i http://some.domain/blah.msi /passive
I would suggest that you write a native app and have it run the first msi and then run the seccons msi. I wrote a blog on how to do this. Here is a link (http://blog.foldertrack.com/?p=45)

Resources