Here is a simple code snippet to assist in determining if another instance of the application is running. If there is another instance then close the current one and provide focus to the already running process.
I located this code on a forum, link here
Continue reading “C# Check If Application Is Already Running Then Set Focus” »
Categories: C# How To, C# Snippets, Development already running, application running, c-sharp, c#, csharp, net, process running, provide focus, set foreground window
I was a little lost to why the dialog boxes I was adding to my windows installer msi was not being passed to my custom action.
There is a very simple item that I overlooked, and that is you must specify what values you want sent to your custom action.
On the properties of the custom action, there is a property called CustomActionData.
The format of this properties is:
/ParamName1=”[DIALOGPROPERTY1]” /ParamName2=”[DIALOGPROPERTY2]” …. etc
Custom Action Properties
Then to use the parameters you will use the following code:
string sqlServer = Context.Parameters["ParamName1"];
string username = Context.Parameters["ParamName2"];
string password = Context.Parameters["ParamName3"];
Categories: C# How To, C# Snippets, Development action, c-sharp, c#, context, csharp, custom, custom action, msi, param, parameter, passing, windows installer