[wix-users] Custom BA: Reading Registry Key Without User Read Permission
r.sean.hall at gmail.com
Wed Feb 17 09:05:15 PST 2021
I believe that currently people will include a utility exe with their BA so
that they can detect that kind of information. This has the drawback of the
user getting two UAC prompts - one from the utility exe during Detect and
one from the bundle when it elevates.
In v4, there is a new concept of a bundle extension that can perform
custom searches during Detect. I think it's a reasonable feature request
for the extension to be able to declare that the search must run in the
elevated engine, but no one's submitted that feature request yet.
The handle for Detect, Elevate, and Apply is supposed to be the window
handle for your UI, Windows Installer and various other APIs that get
called require one.
On Wed, Feb 17, 2021 at 10:37 AM Bryan Dam via wix-users <
wix-users at lists.wixtoolset.org> wrote:
> We have a custom BA to install an extension/plugin to a Microsoft
> product. We need to get some connection information about that product
> from the user and ideally verify that the service account they provide can
> access it. Nothing too crazy there and that's all working just fine.
> However, the idea was put forth that we should be able to automatically
> detect a lot of that information. We might have to bounce around making
> some remote registry calls but the info is all there. I've got that
> working with a singular exception: some of the registry keys do not have
> read only permissions for the Users group. It's not my product, I'm not
> writing those keys, so there's nothing I can do about that part. If I
> right click and run the installer as administrator it all works
> beautifully. Any ideas on how to handle this?
> Auto-elevating the entire BA would obviously work but I've read those
> threads and it seems that's just bad ju-ju even if I'm not modifying
> There's Engine.Elevate() but that intentionally doesn't elevate the UI and
> I'm not exactly sure what handle I should be giving it. Is it possible to
> elevate the engine and then run elevated code using Detect/Plan callbacks?
> Or is this just a fools errand?
> WiX Toolset Users Mailing List provided by FireGiant
More information about the wix-users