[wix-users] Debug custom action in VS2017
Lmloge
lmloge at orange.fr
Mon Jan 28 02:05:18 PST 2019
Hello and thank you for your answer.
> Your debugger must be running elevated (as an administrator).
The debugger is running elevated (as an administrator).
> especially when debugging deferred CAs
The custom action is not deferred.
> CAs that don't "run as user"
I am not sure how the custom action is run.
Given my original post, it looks like it is run as <hostname>\<username>:
In Visual Studio 2017, when I select the menu "Debug -> Attach to
process...".
I can see the following entry in the "Available processes" list :
Process : msiexec.exe
Title : (Custom action) Debug
Type : x86
Username: <hostname>\<username>
Session : 9
where:
<hostname> is my machine name.
<username> is my system user name.
> Using MessageBox doesn't always work
What do you mean?
The message box actually appears.
> the environment variables involved need to be set per-machine
What environment variables are you talking about?
Best regards.
--
Léa
My time:
https://www.horlogeparlante.com/heure-brest-france-HEUREfrance3030300.htm
On 25/01/2019 7:22 PM, Blair Murri wrote:
> Your debugger must be running elevated (as an administrator).
>
> Using MessageBox doesn't always work (especially when debugging
> deferred CAs that don't "run as user". MSFT provides instructions, but
> the environment variables involved need to be set per-machine and it's
> recommended to reboot after setting them to ensure that they will be
> found by all the system services that need to see them
>
> --
> Blair Murri
>
>
>
>
>
> ------------------------------------------------------------------------
> *From:* wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf
> of Lmloge via wix-users <wix-users at lists.wixtoolset.org>
> *Sent:* Friday, January 25, 2019 2:19:24 AM
> *To:* wix-users at lists.wixtoolset.org
> *Cc:* Lmloge
> *Subject:* [wix-users] Debug custom action in VS2017
> Hello,
>
> After building a setup file
> and while trying to install an application by running this setup file
> something wrong is happening while executing a custom action.
>
> To find out what's going wrong, I need to debug the code which is C/C++
> code in Microsoft Visual Studio 2017.
>
> To do that, I've put a "MessageBox()" function call in the custom action
> code:
> MessageBox(NULL, L"*** (Custom action) Please attach a debugger. ***",
> L"(Custom action) Debug", MB_OK);
>
> When I start the installation, the message box pops up.
>
> In Visual Studio 2017, I select the menu "Debug -> Attach to process...".
> I select the entry in the "Available processes" list :
> ------------+-----+--------------------------+------+-----------------------+-----------
> Process | ... | Title | Type | User
> name | Session
> ------------+-----+--------------------------+------+-----------------------+-----------
> msiexec.exe | ... | (Custom action) Debug | x86 |
> <hostname>\<username> | 9
> ------------+-----+--------------------------+------+-----------------------+-----------
> and click "Attach".
> <hostname> is my machine name.
> <username> is my system user name.
>
> I get the error message:
> "Unable to attach to process. Access is denied."
>
> I have tried to make it work with no success.
>
> Can you advise me what to do to be able to debug my custom action code?
>
> Thank you.
> Best regards
> --
> Léa
More information about the wix-users
mailing list