By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,988 Members | 1,017 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,988 IT Pros & Developers. It's quick & easy.

Action Text in Visual Studio C# Custom Actions

P: n/a
I have C# custom actions and merge modules created in Visual Studio to
install some components of the application I am working on. The merge
modules are used with an Install Shield 9 project. When my C# custom
actions run, the progress dialog doesn't display any text as to what
is happening. I have explored several options as follows.

Normally, you can enter the action text in the ActionText table by
giving the name of the custom action and then your desired description
and template. Since Visual Studio uses GUIDs in the custom action name
and those GUIDs change upon every build of the merge module, it is not
practical to enter the action text in the Install Shield project.

The next logical place to do something is inside the custom action
itself using the Windows Installer APIs. There is an API called
MsiProcessMessage that indicates it can be used to update the action
text. There is even a C# wrapper class posted on CodeProject.com
(http://www.codeproject.com/csharp/msiinterop.asp) that provides a C#
interface to the common Windows Installer APIs. The catch, however,
is that you need to have an MSIHANDLE to the current instance of the
Windows Installer database for the install that is being run. The
help idicates that the MSIOpenDatabase API will return an MSIHANDLE,
however, it is not to the instance that is loaded into memory at
install time so changes don't effect the progress dialog displayed.

Using MsiProcessMessage would be ideal as it appears that I would be
permitted to change the action text as various parts of my custom
action run.

Does anybody know how I can obtain a handle to the installers instance
of the MSIHANDLE from a Visual Studio C# Custom Action, or even some
other way to update the action text.

Thank you for your help.

--Ron
Nov 16 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.