-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ElevatedManagedAction issue #1220
Comments
Workaround was to give id in prop init list instead of ctor. |
The constructors are used to init the most commonly used properties. For everything else use initializers. Exactly as you did. |
Let me approach this from a different perspective. In wixsharp, we have the ElevatedManagedAction class, which is a specialized version of the ManagedAction class. This ElevatedManagedAction class just presets some properties to their proper values (Impersonate=false, Execute=Execute.deferred), in order to generate a custom action that runs elevated. Defines WiX Managed CustomAction, which is to be run with elevated privileges (UAC). Here's the problem: That 2 ctors are traps, the programmer expects to get an elevated custom action - but it won't be, and it only gets clear what the problem is, when the programmer checks the generated wxs. |
As a background info... Now, about your very question about these two constructors. It is an API bug caused by the typo. Fixed now. The fix will be available in the very next release. And another note. The use of var project = new ManagedProject(...
. . .
project.AfterInstall += (SetupEventArgs e) =>
{
// do whatever action that requires elevation
}; Providing you want to do your action after install of course. |
Thank you for the fix and the note! |
- Issue #1244: The directory Id generated can be too long - Issue #1223: Non LegacyDummyDirAlgorithm creates C:\ProgramFilesFolder empty folder - Issue #1220: ElevatedManagedAction issue - Feature #1204: Feature - RegisterCom class to ease the registration of COM files - Issue #1203: SilentBootstrapperApplication - Issue #182 (extended solution): RegistrySearch has "Win64=no" when building x64 installers - Added Self-executable_Msi sample - Added WixBootstrapper_EmbeddedUI to demonstrate how to show managed UI if the bundled MSI - Added sample for customization of the stock Burn UI. Triggered by #1219 - Added sample for "Issue #1218: Dynamic custom UI sequence" - Resurrected setting user input from BA UI and passing it to the msi. RegistrySearch input is also retained. - Added validation for `Issue #1075: [FEAT] Add error if LaunchApplicationFromExitDialog using in common Project` error. - Fixed problem with RegKey being placed in the x86 root XML dir for the x64 project
Hi,
Today, I ran into an issue, I used a specific ctor of ElevatedManagedAction and my custom action suddenly got permission issues. Turned out that impersonate=no is not generated with that ctor. I checked the source code, impersonate=false is missing from 2 ctors at line 309 and 326. Is this intended or a bug?
The text was updated successfully, but these errors were encountered: