0

I have looked at this question, but it is something different.

I need to change the message of MsiRMFilesInUse Dialog box.

Currently the message is "Do not close applications. (A reboot will be required.)"

I need to get it changed to "Do not close applications. (Application may not work)" .

The message comes when application is open, and user try to uninstall the app.

The only (but big) restriction is to do it in Visual Studio 2010 setup project. (Installshield/Wix are not allowed).

I have looked at custom action, not able to figure out how to change the message.

Another approach is to create a custom dialog box, but then i am not able to change the dialog box somehow. Also new dialog box has a very limited set of controls.

Community
  • 1
  • 1
Tilak
  • 30,108
  • 19
  • 83
  • 131
  • This is restriction put on me. I have used Installshield, Wix, NSIS in past. Installshield is tool for setup experts (IMO). But your comments are not anyway related to the question. If you can say this is not possible (with appropriate msdn link which i am unable to find), it would be much better answer to the question. – Tilak Jan 17 '13 at 13:37
  • It isn't possible. I don't have to provide a link. (Think about it, Microsoft isn't going to have a link for every thing their product CAN'T do. ) It's very relevant because I'm trying to point out you have bigger problems. Eitherway, good luck with it. As I said, I knew I'd be wasting my time. – Christopher Painter Jan 17 '13 at 13:49

1 Answers1

1

Per MsiRMFilesInUse Dialog (Windows)

The MsiRMFilesInUse Dialog box can be authored to display a list of processes that are currently running files that need to be overwritten or deleted by the installation. The user can select between options to "Automatically close applications and restart them" or "Do not close applications. (A reboot will be required.)" If the user selects the "Automatically close applications and restart them" option, a push button control on this dialog box can be authored to publish the RMShutdownAndRestart control event and the Restart Manager can close the applications and restart them at the end of the installation. This can eliminate or reduce the need to restart the computer. For more information, see System Reboots.

Notice the generous use of the word "can be authored". It is written this way because the perspective is of the Windows Installer SDK (Windows Platform). InstallShield (Basic MSI) and WiX (UI Extension) both author this table. Visual Studio Deployment Projects do not because Microsoft (DevDiv) never put the effort in to support it. You can't modify what isn't there.

Now if you are a Windows Installer expert ( which I doubt otherwise you wouldn't even be posting this question ) there are things that can be done. You can write postbuild commands to modify the built MSI to perform SQL updates and/or apply transforms to inject a custom authored dialog into your MSI after VS is done building it.

I've been down this road, I know how to do it. I also know how counterproductive it is as you'll find yourself doing it ALOT to make up for the short comings of the tool. At that point you understand why WiX / InstallShield is needed and move on.

And for the record, I once quit a very well paying job because VDPROJ is all the development managers would allow. I also returned a couple years later for even more $$$$ when they finally realized that they didn't know what they were talking about.

Good luck.

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
  • You rightly said, I am no windows installer expert. " I know how to do it" -> Can you point some link so that i can get started. I know it is like cakewalk in Installshield, but that is not an option to me. – Tilak Jan 17 '13 at 13:42
  • The techniques I mention are like injecting custom IL into a prebuilt .NET assembly. The knowledge to do such a thing far exceeds a simple answer on StackOverflow. It's also an antipattern. Sorry I will not offer it up. – Christopher Painter Jan 17 '13 at 13:50
  • Here's the best I'll give you: http://social.msdn.microsoft.com/Forums/is/windowscompatibility/thread/21cf9eca-8e45-4e5d-8cf1-a3f88bed4051 – Christopher Painter Jan 17 '13 at 13:54
  • That link seems to be in different direction. After some digging in, I ended up with a CustomAction which throw error if application is open. What it does -> It does not allow uninstallation if application instance is open (This was primary objective). What it lacks -> Inconsistent behavior (Behavior is different on win xp, and win 7, Different behavior on different win 7 environment) (This was secondary objective) – Tilak Jan 30 '13 at 16:53
  • That's pretty much where VDPROJ leaves you. Anytime you reach a limitation of the tool, developers end up writing custom actions to get around it which is an anti-pattern as far as MSI is concerned. – Christopher Painter Jan 30 '13 at 18:17
  • I cannot judge if it is anti pattern, but writing custom action(in VS setup type project) was not enough. As a result what currently i have is a very obscure and also inconsistent user experience. It seemed native custom action + post build custom hookup before InstallValidate was the way to go, but it looked a daunting task. – Tilak Jan 30 '13 at 18:30
  • It is a daunting task, one that isn't really needed if you'd just use a better tool. That said, it's one of the better antipatterns because the magic happens at build time instead of runtime. Anytime you start adding custom actions, if you don't know EXACTLY what you are doing, you decrease installer reliability. If you work for a big company where your installers often go to 100,000 machines or you work for an ISV with thousands of customers, you will feel the pain in Support if you are less then 99.99% reliable. – Christopher Painter Feb 01 '13 at 11:56