Skip to content
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

UAC Text is not localized #341

Closed
dviry opened this issue Apr 12, 2018 · 3 comments
Closed

UAC Text is not localized #341

dviry opened this issue Apr 12, 2018 · 3 comments
Labels

Comments

@dviry
Copy link

dviry commented Apr 12, 2018

Hi Oleg,

after getting 1.6.4 the ProgressDialog received an extra UAC "warning" text:

There is no possibility to totally hide this nor to localize it... So yes, for now I'll have to temporarly implement my own but I think the default ManagedUI should provide an easier way to customize this.

Cheers

@oleg-shilo
Copy link
Owner

Yeah, this is the annoying one.

You probably know what triggered this new feature, which is an attempt to communicate to the user that MSI/UAC have problems. There were complains from the users assuming that WixSharp is somehow responsible for that error. Some even suggested that if WixSharp cannot fix (OS problem!) it then it is completely useless.

I am annoyed by the fact that WixSharp has to take this offense simply because it "at the wrong place at the wrong time".

But I agree that:

  • localization is overlooked in this case and needs to be implemented in some way
  • there should be a good way to control the visibility of the warning.
  • "link appearance" should be matched with the link behavior.

In a mean time please use this work around to hide the warning message:

project.UILoaded += Project_UILoaded;
...
static void Project_UILoaded(SetupEventArgs e)
{
    e.ManagedUI.OnCurrentDialogChanged += dialog =>
    {
        if (dialog.GetType() == Dialogs.Progress)
            foreach (Control c in (dialog as Form).Controls)
                if (c is LinkLabel)
                {
                    c.Visible = false;
                    break;
                }
    };
}

@oleg-shilo
Copy link
Owner

Done.

// custom (localized) message
AutoElements.UACWarning = "Wait for UAC prompt to appear on the taskbar.";

image

// hidden message
AutoElements.UACWarning = null;

image

oleg-shilo added a commit that referenced this issue May 26, 2018
Accumulative fixes and minor improvements.

-----
v1.6.5.0
- Added session extension `e.Session.GetMainWindow()` for properly displaying message box from CAs
- Updated all sample projects to target v4.6.1 runtime
- Issue #373: Bootstrapper.DigitalSignature.Apply hide console output
- Issue #372: MsiFile location

v1.6.4.3
- Issue #354: Adding an InternetShortcuts throw NullReferenceException
- Assorted internal fixes (XML docs etc.)
- All compatible `IGenericEntity.Process(ProcessingContext)` cases moved to `WixEntity.CreateAndInsertParentComponent`

v1.6.4.2
* Issue #344: Duplicate symbol 'Directory:ProgramFilesFolder' found

v1.6.4.1
* Updated all IGenericEntity implementations to support 'no-directory' deployments
* Removed all references to the obsolete `IncludeWixExtension`
* Implemented clean algorithm for handling no-dir scenarios without resorting to the `%ProgramFiles%\WixSharp\DummyDir`.
  Algorithm is controlled by `AutoElements.LagacyDummyDirAlgorithm`
* Issue #341: UAC Text is not localized
* Implemented adding custom error description of he ManagedUI.ExitDialog depending on the Install error or cancellation.
@alexpwnz
Copy link

alexpwnz commented Jul 5, 2020

Yeah, this is the annoying one.

You probably know what triggered this new feature, which is an attempt to communicate to the user that MSI/UAC have problems. There were complains from the users assuming that WixSharp is somehow responsible for that error. Some even suggested that if WixSharp cannot fix (OS problem!) it then it is completely useless.

I am annoyed by the fact that WixSharp has to take this offense simply because it "at the wrong place at the wrong time".

But I agree that:

  • localization is overlooked in this case and needs to be implemented in some way
  • there should be a good way to control the visibility of the warning.
  • "link appearance" should be matched with the link behavior.

In a mean time please use this work around to hide the warning message:

project.UILoaded += Project_UILoaded;
...
static void Project_UILoaded(SetupEventArgs e)
{
    e.ManagedUI.OnCurrentDialogChanged += dialog =>
    {
        if (dialog.GetType() == Dialogs.Progress)
            foreach (Control c in (dialog as Form).Controls)
                if (c is LinkLabel)
                {
                    c.Visible = false;
                    break;
                }
    };
}
static void Project_UILoaded(SetupEventArgs e)
        {
            e.ManagedUI.OnCurrentDialogChanged += dialog =>
            {
                if (dialog.GetType() == Dialogs.Progress)
                    foreach (Control c in (dialog as Form).Controls)
                        if (c.Name.StartsWith("waitPrompt", StringComparison.InvariantCultureIgnoreCase))
                        {
                            c.Text = "Пожалуйста, подождите, пока появится приглашение UAC.\r\n\r\nЕсли он свернут, активируйте его на панели задач";
                            c.ForeColor = Color.Red;
                            break;
                        }
            };
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants