Skip to content

wixnative.exe pipe failure when console is not initialized (SetConsoleCP closes stdin/stdout) #9267

@roman-bcny

Description

@roman-bcny

wix burn extract fails with IOException: The pipe is being closed when the Windows console subsystem has not been fully initialized. In my testing this happens on the first invocation after a fresh boot and succeeds on subsequent runs, presumably due to lazy console initialization.

In ConsoleInitialize() (conutil.cpp), SetConsoleCP(CP_UTF8) is called unconditionally. When no console is available, this fails and the ConExitWithLastError error path closes vhStdIn and vhStdOut — which are valid pipe handles from the parent process. wixnative then cannot read the stdin preamble and exits. On the wix.exe side, StandardInput.WriteLine throws IOException before WaitForExit is called, so the actual error from wixnative is never collected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions