microsoft / Microsoft-Win32-Content-Prep-Tool

A tool to wrap Win32 App and then it can be uploaded to Intune
1.01k stars 212 forks source link

IntuneWinAppUtil.exe cannot be launched from c# code without console visible #111

Closed EdijsPerkums closed 5 months ago

EdijsPerkums commented 1 year ago

When launching IntuneWinAppUtil.exe from C# code without console visible we get the following error: System.IO.IOException: The handle is invalid. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.Console.GetBufferInfo(Boolean throwOnNoConsole, Boolean& succeeded) at Microsoft.Management.Service.IntuneWinAppUtil.LogUtil.PrintProgress(AppContext context) at Microsoft.Management.Service.IntuneWinAppUtil.PackageUtil.CreatePackage(String folder, String setupFile, String outputFolder, String catalogFolder) at Microsoft.Management.Service.IntuneWinAppUtil.Program.Main(String[] args) It worked fine before #109

@nikyusof this breaks our apps integration with IntuneWinAppUtil.exe and it would be great if this could be fixed. Please let me know if more information is required. Thank you!

rasq commented 1 year ago

Same problem.

Hardexit commented 1 year ago

Packaging has also stopped working in my script since the v1.8.5 update, but back to v1.8.4 it works without any problems.

esmorun commented 1 year ago

Same problem here, we use it to package applications from an Azure Devops pipeline Powershell script. After the 1.8.5 update, it no longer works.

MA-Jason-Coombes commented 1 year ago

Issue still occurring.

image
jaspain commented 1 year ago

Same issue. IntuneWinAppUtil.exe 1.8.5 must run in a visible window to work properly.

jkelly-180 commented 1 year ago

Same issue for me when using RedirectStandardOutput with Start-Process in PowerShell 5.1

charchess commented 1 year ago

Same issue for me using intuneWin32App library, really annoying

ameltzer-MSFT commented 5 months ago

89