0

I am running custom action that suppose to execute some function in provided dll. this function connects to sql db and do some select with return, but i cannot see the return value. How can i debug this function in dll, or check if it is really executed.

2
  • 1
    Never got money on installshield, so we're using NSIS, anyway if it is custom action which you own, you can either write logging info to to text file (with timestamp) or display message box in start of custom action, then attach visual studio to the process once messagebox is shown. Commented Jun 25, 2013 at 7:56
  • Thanks Ondrej Svejdar. Commented Jun 26, 2013 at 7:36

2 Answers 2

1

I've use C++ custom action DLLs, so I'm not entirely sure how a C# custom action DLL differs. However, I usually use the method Ondrej mentioned: logging to the MSI log file and/or message boxes that pause the custom action execution so I can attach to the process via Visual Studio.

Are you familiar with how that is done?

Sign up to request clarification or add additional context in comments.

3 Comments

Thank for your reply. i am raising the message box but when i try to attach to setup process the debug red dot in hollow,so it means that it will not stop on it.Do you have some suggestions?
I got it. I need to attach to the custom action process and not to setup process. thanks NGaida.
It depends what he's using to create the custom action. Hopefully DTF. If InstallUtil / Installer Class custom actions, they run out of process and have no ability to write to the MSI log file.
0

InstallShield has native SQL script handling for most of your needs. This will automatically give you a lot of logging in the MSI log file. However returning result sets is one thing it doesn't do.

The best thing to do is write your managed C# custom action using Windows Installer XML (WiX) Deployment Tools Foundation (DTF). This builds custom actions that appear as C++ custom actions to the Windows Installer and is fully compatible with InstallShield.

Inside of a DTF custom action you can use session.Log() to record useful debugging information in the Windows Installer log file. You can also attach a debugger to the custom action and step through it if you want. See the following for more information:

Deployment Tools Foundation (DTF) Managed Custom Actions

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.