aaronparker / packagefactory

A packaging factory for Microsoft Intune using Evergreen, VcRedist, and IntuneWin32App
https://stealthpuppy.com/packagefactory/
MIT License
63 stars 18 forks source link

Error: Unable to detect expected 'packagename.intunewin' file after IntuneWinAppUtil.exe invocation #43

Closed maartendamen closed 1 month ago

maartendamen commented 11 months ago

Just for reference, currently with the latest IntuneWin32App PowerShell module, which is installed when you start a greenfield setup with packagefactory the creation of packages breaks with the erro:

Error: Unable to detect expected 'packagename.intunewin' file after IntuneWinAppUtil.exe invocation

Took me a while to figure this out but it is a known issue in IntuneWin32App https://github.com/MSEndpointMgr/IntuneWin32App/issues/121

The fix is to locate Invoke-Executeable.ps1 (by default in C:\Program Files\WindowsPowerShell\Modules\IntuneWin32App\1.4.2\Private) and update it as follows:

        $ProcessStartInfoObject.CreateNoWindow = $true 
        $ProcessStartInfoObject.UseShellExecute = $false 
        $ProcessStartInfoObject.RedirectStandardOutput = $true 
        $ProcessStartInfoObject.RedirectStandardError = $true 
        $ProcessStartInfoObject.CreateNoWindow = $false
        $ProcessStartInfoObject.UseShellExecute = $true
        $ProcessStartInfoObject.RedirectStandardOutput = $false
        $ProcessStartInfoObject.RedirectStandardError = $false

Hope this helps others as it took me quite some time to figure this out.

aaronparker commented 5 months ago

I think this was fixed in an update to IntuneWin32App