How to create Intune Win format from an EXE file
Question
Hi All,
I am trying to use Powershell to run intunewinapputil.exe to create the intunewim files. i cant seem to get it to work through powershell if it take the output and run it through cmd it runs without issue but running through powershell it i see it run it creates the intunewim file under temp but never seems to move it to the file location i specify. seems like the process never runs.
$win32preptool = “C:IntuneMicrosoft-Win32-Content-Prep-Tool-masterIntuneWinAppUtil.exe”
$SourceFolder = “C:win32appsZoomZoom5.17.0”
$OutputFolder = “C:Intune”
$IntuneApp = “Zoom_5.16.10.26186_Machine_X64_msi_en-US.msi”
# Build the command string
$command = “$win32preptool -c “”$SourceFolder”” -s “”$IntuneApp”” -o “”$OutputFolder”””
# Output the command to the console
Write-Host “Executing command: $command”
# Start the process
Start-Process -FilePath $win32preptool -ArgumentList @(
“-c”, $SourceFolder,
“-s”, $IntuneApp,
“-o”, $OutputFolder
) -Wait
Posted by Joe Terracciano in HTMD FB Group
Answers ( 2 )
Replied by David Hastur Hornman
Without actually testing it, I assume the double quotation for the command is what’s failing. Try using “$($SourceFolder)” and the same for $IntuneApp and $OutputFolder
Replied by Joe Terracciano
That didn’t work; it gets to here, then just closes
Replied by Sébastien Le Blevec
You can use these PowerShell cmdlets from MSEndPointMgr: https://github.com/MSEndpointMgr/IntuneWin32App
Replied by Joe Terracciano
David will try that thanks
Replied by Joe Terracciano
I figured it out. I have to run the intunewinapputil.exe as an admin in order for it to work even though the permissions are there on the folder to allow full access.
Replied by Ingo Flink
Let me ask a question… what’s the goal here? What time does it save?
Replied by Joe Terracciano
Ingo, I have a script that goes out and gets the latest version of the app; then, I am hoping to have it create the intunewin file so I can upload it.