I can't manage to install exe file since wix 3.11 error: 0x80070002

0

It happen to me a strange case since the wix update 3.11.1. When I press click in to my exe installer (without admin privilages) the UAC throws me the info panel, until here everything right, but if I click in show me details from this UAC panel the program location paths it's incorrect specifically "C:\Users\xuser\AppData\Local\Temp\{FEE22F2E-7581-4002-A5AB-38F91D2C6C14}\.cr\program.exe" where actually it has been open in "C:\program\bin\Release\program.exe".

Nevertheless when I open the exe installer with admin privileges right mouse button the UAC shows me a correct path witch everything works as expected.

This behavior it's new since wix v3.11 update since previously I could do it without right mouse click. The UAC it started with a correct program location path with and without administrator privileges.

The log file without admin privileges generated with wix 3.11;

[17E4:2708][2018-05-10T15:59:01]e054: Failed to resolve source for file: C:\Users\xuser\AppData\Local\Temp\{FEE22F2E-7581-4002-A5AB-38F91D2C6C14}\.cr\Program.exe, error: 0x80070002.
[17E4:2708][2018-05-10T15:59:01]e000: Error 0x80070002: Failed while prompting for source (original path 'C:\Users\xuser\AppData\Local\Temp\{FEE22F2E-7581-4002-A5AB-38F91D2C6C14}\.cr\program.exe').
[17E4:2708][2018-05-10T15:59:01]e311: Failed to acquire container: WixAttachedContainer to working path: C:\WINDOWS\Temp\{EEF57633-7CDB-4F8A-B221-015E4033801B}\0929FF0DDAA0AADA8AA7B660CD9F5E20A42CF569, error: 0x80070002.
[17E4:1A70][2018-05-10T15:59:01]e000: Error 0x80070002: Failed while caching, aborting execution.

This installer contains three projects the setup with (.wxs), boostraper(bundle.wxs) and UI(WPF). The bundle project returns me the program.exe installer with inside there are build setup and UI.

The privileges are elevated inside the WPF project in Run method exactly;

internal static void RestartElevated() {
            ProcessStartInfo startInfo = new ProcessStartInfo();
            startInfo.UseShellExecute = true;
            startInfo.WorkingDirectory = Environment.CurrentDirectory;
            startInfo.FileName = Application.ExecutablePath;
            startInfo.Verb = "runas";
            MessageBox.Show(Application.StartupPath);
            try {
                Process p = Process.Start(startInfo);
            } catch (System.ComponentModel.Win32Exception ex) {
                return; //If cancelled, do nothing
            }

            Application.Exit();
        }

Any kind of help is good, as I have been several days and I can't archive to find no one valid solution. Finally, there are some solution in order to execute UAC with the correct path without pressing right button and run as admin (thanks to runas verb)?

c#
wpf
wix
uac
asked on Stack Overflow May 10, 2018 by gvivetapl • edited May 10, 2018 by gvivetapl

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0