Hi,

> > It might be somewhat more convenient to add the PID to the debug
> > MessageBox call, but it is probably MUCH more convenient to use the
> > CustomAction debugging facility built into the MSI service itself:
> >
> > https://docs.microsoft.com/en-us/windows/desktop/Msi/debugging-custom-
> > actions
> 
> Many thanks for this. I will test the MsiBreak method shortly and remove
> the MessageBox calls completely for a cleaner code then.

I gave the MsiBreak method a quick try, but I couldn't make it work. I have
set MsiBreak as a system environment variable, restarted Windows Installer
service, restarted the shell window from where I invoke msiexec calls to
make sure the environment is updated. But it doesn't pop-up any prompt to
attach debugger as advertised.

I haven't installed the Debugging Tools for Windows, as I run Visual Studio
elevated to debug processes. I haven't restarted my computer: restart of a
working machine with stage set to debug something is a royal PITA: the
libopenvpnmsica.dll has more than one custom property to debug, restarting
each time to switch MsiBreak to a different custom action is not viable.

Therefore, I'd prefer to keep own MessageBox() call in the beginning of each
custom action. It works 100%.

Adding PID to the message is an option. I personally never needed it. When
running Visual Studio elevated, you press Ctrl+Alt+P, followed by "msi"
keystrokes to focus on "msiexec.exe" processes, then observe the
MessageBox()'s title (which is deliberately set to function name) in the
"Title" column of the available process list. Way faster than searching
process by PID.

Anyway, I have extended the debug pop-up dialogs to be more informative and
include PID. Patch follows...

Best regards,
Simon

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to