microsoft / microsoft-win32-content-prep-tool Goto Github PK
View Code? Open in Web Editor NEWA tool to wrap Win32 App and then it can be uploaded to Intune
A tool to wrap Win32 App and then it can be uploaded to Intune
Is there full documentation as to what the contents of an intunewin file are? For example metadata/config files that can be include or how say an install script would work that does extra steps with the exe file.
when this is ran it creates a file called "INTUNEWIN file" how the heck do I turn this into a .exe from here. this doesn't work like the old tool did.
Folder is misspelled in the output when prompting. Below is an example:
IntuneWinAppUtil.exe -c "C:\Users\User\AppData\Local\Data Path" -s file.exe -o "C:\Shared\output"
The output foder 'C:\Shared\output' does not exist. Do you want to create it (Y/N)?
The tool does not emit any usable exit code:
>IntuneWinAppUtil -c asdf -s asdf -o . -q
The setup file you specified can not be accessed.
>echo %errorlevel%
0
This makes it pretty unreliable when included in automatic (CI) systems if there is no way to detect if it was sucessfull or not.
Hello, why why the packages always so much lurcher after converting the .exe into a .intunewin file?
For example. I downloaded Adobe Acrobat Reader DC with 180MB. After the script the .intunewin file is 600MB large.
Am I doing something wrong or is it just like that?
What is the reason behind of not publishing the source code of this fairly small tool?
There are issues open since a very long time and it seems nobody cares about them. Why can't the community support the further development of the tool. Let the community do some pull requests to help fix issues. Like the wrong character set handling in filenames etc.
For example, wireshark packaged with v1.7:
and with v1.6:
This is under Windows 10 1909 (18363.720)
$PSVersionTable.PSVersion
Major Minor Build Revision
----- ----- ----- --------
5 1 18362 628
And .NET Framework 4.8.03752:
gci 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\'
Hive: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full
Name Property
---- --------
1033 CBS : 1
Install : 1
Release : 528040
Servicing : 0
TargetVersion : 4.0.0
Version : 4.8.03752
Happy to provide further information by request.
Thank you.
I keep getting this error when trying to run this tool from admin powershell, admin cmd. Tried it on an .exe and an .msi both do not work
I'm trying to add some Autodesk products in intune.
Unfortunately I come across an issue that certain subfolders are not wrapped.
Is there a limit on the number of subfolders or is there a limit on the file length
example
Img \ x64 \ FormIt \ ce1643 \ 3a0191
It appears there is an issue with detecting .Net - the error message is:
Yes takes you to:
Running the advised tool simply advises: ".NET Framework 4.8 or a later update is already installed on this computer."
This is on the latest build of Windows 11 (Insider Beta Channel, see details below) and a recent .Net quality update (also see below) has been applied. I've tried installing .Net 4.8 which confirms it is already installed and therefore won't install.
Cumulative Update for Windows 11 (10.0.22000.120) (KB5005188)
2021-07 Cumulative Update for .NET Framework 3.5 and 4.8 for Windows 11 for x64 (KB5004316)
Also reporting to Windows 11 team of course.
When Windows 10 FIPS mode is enabled, the tool errors out:
File '...intunewin' has faield to be generated
[=============================== ] 61% Done!!!
System.InvalidOperationException: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.
at System.Security.Cryptography.SHA256Managed..ctor()
at Microsoft.Management.Service.IntuneWinAppUtil.EncryptUtil.EncryptFile(String file, 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)
Here is the registry key for FIPS mode:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\FipsAlgorithmPolicy\Enabled
The workaround is to temporarily disable FIPS mode, then re-enable it.
Trying to add catalogs for Windows 10S for 7zip it's raising IOException.
If i remove the catalog dir argument it works ok.
C:\ppp\Microsoft-Win32-Content-Prep-Tool-master>IntuneWinAppUtil.exe -s 7zip\exe\7z1900-x64.exe -a 7zip\cats\ -o s
Validating parameters
Validated parameters with 37 milliseconds
Compressing the catalog folder '7zip\cats' to 'C:\Users\admin\AppData\Local\Temp\212aa682-3a19-4f84-99cc-94f2b03d218b\IntuneWinPackage\Contents\IntunePackage.intunewin'
Max index for catalog prefix search is -1.
Copying catalog files from 7zip\cats\ to C:\Users\admin\AppData\Local\Temp\18316671-2f68-4d02-9125-9d114d9685b6\Cat_C029B285-222F-460B-8ECA-2CD7A8A424B7.
Copying catalog file from 7zip\cats\7z1900-x64.cat to C:\Users\admin\AppData\Local\Temp\18316671-2f68-4d02-9125-9d114d9685b6\Cat_C029B285-222F-460B-8ECA-2CD7A8A424B7\7z1900-x64.cat.
Copying catalog file from 7zip\cats\7z1900-x64.cdf to C:\Users\admin\AppData\Local\Temp\18316671-2f68-4d02-9125-9d114d9685b6\Cat_C029B285-222F-460B-8ECA-2CD7A8A424B7\7z1900-x64.cdf.
Copied catalog files from 7zip\cats\ to C:\Users\admin\AppData\Local\Temp\18316671-2f68-4d02-9125-9d114d9685b6\Cat_C029B285-222F-460B-8ECA-2CD7A8A424B7. with 55 milliseconds
Calculated size for folder 'C:\Users\admin\AppData\Local\Temp\18316671-2f68-4d02-9125-9d114d9685b6\Cat_C029B285-222F-460B-8ECA-2CD7A8A424B7' is 2062 with 2 milliseconds
Compressed folder 'C:\Users\admin\AppData\Local\Temp\18316671-2f68-4d02-9125-9d114d9685b6\Cat_C029B285-222F-460B-8ECA-2CD7A8A424B7' successfully with 127 milliseconds
Compressing the souce folder '7zip\exe' to 'C:\Users\admin\AppData\Local\Temp\212aa682-3a19-4f84-99cc-94f2b03d218b\IntuneWinPackage\Contents\IntunePackage.intunewin'
Calculated size for folder '7zip\exe' is 1447178 with 0 milliseconds
Removing temporary files
Removed temporary files with 15 milliseconds
File 's\7z1900-x64.intunewin' has faield to be generated
System.IO.IOException: The file 'C:\Users\admin\AppData\Local\Temp\69954d04-1cff-430a-a365-7d1bb8b237d3\IntuneWinPackage\Contents\IntunePackage.intunewin' already exists.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.IO.Compression.ZipFile.Open(String archiveFileName, ZipArchiveMode mode, Encoding entryNameEncoding)
at Microsoft.Management.Service.IntuneWinAppUtil.ZipUtil.CreateFromDirectory(String sourceDirectoryName, String destinationArchiveFileName, Nullable`1 compressionLevel, Boolean includeBaseDirectory, ReportProgress reportProgress)
at Microsoft.Management.Service.IntuneWinAppUtil.ZipUtil.ZipFolder(String folder, String zipFile, AppContext context, Boolean noCompression, Boolean includeBaseDirectory, Boolean appendFile)
at Microsoft.Management.Service.IntuneWinAppUtil.PackageUtil.CreatePackage(String folder, String setupFile, String outputFolder, String catalogFolder)
at Microsoft.Management.Service.IntuneWinAppUtil.Program.Main(String[] args)
.MSI might need access to original installation media during Repair/Update/Uninstall. Location of media is stored to registry HKEY_CLASSES_ROOT\Installer\Products"package"\SourceList. This information is written based location where MSI is stored during installation.
Intune extracts Intunewin file to c:\windows\IMECache -> Installs MSI -> Deletes media. After this sourcelist in registry points location what doesn't exists. This can end up in scenario where packages repair/update/uninstall might fail.
My workaround is copy installation media to client and add it's location to registry. Is it possible build this or something else functionality to intunewin to fix this issue?
I get the following error: IntuneWinAppUtil.exe is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher.
I have 1 EXE and 1 CFG file that I want to get togehter in an INTUNEWIN file. I use IntuneWinAppUtil. As source I point to my EXE file. For catalog I point to the sourcefolder where bothe EXE and CFG are in. That generates an error the temp file intunepackage.intunewin allready exists.
Am I doing something wrong?
Using the version 1.8.2
Unzipping the content fails on clients when there are not only files but also folders (and nested folders) in the package.
My workaround is a powershell script that manually creates the required folder, moves all files to their original location and calls setup.exe.
.\IntuneWinAppUtil -c C:\Temp\Azure\RawApps\FortiClient -s FortiClientSSO.msi -o 123 -q
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.
Parameter name: top
Actual value was 3074.
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.Management.Service.IntuneWinAppUtil.LogUtil.PrintProgress(AppContext context)
at Microsoft.Management.Service.IntuneWinAppUtil.LogUtil.WriteLine(AppContext context, String text)
at Microsoft.Management.Service.IntuneWinAppUtil.PackageUtil.CreatePackage(String folder, String setupFile, String outputFolder, String catalogFolder)
at Microsoft.Management.Service.IntuneWinAppUtil.Program.Main(String[] args)
When it will be fixed?
Hello!
I'm using the current version (1.8.3.0) and sometimes I get a huge intunewin file. I managed to create some intunewin with almost the same size (1Mb less in my last convertion) but now I'm packing Microsoft Visual C++ 2017 Redistributable, where the source exe is ~24Mb and the intunewin is 1,1Gb!
The same happened for .NET Framework 4.8: 118Mb turned into a 1,1Gb file.
Rebooted, downloaded the prep tool again, still same result.
Anyone with the same issue?
Thanks!
ERROR System.IO.IOException: The tag present in the reparse point buffer is invalid.
Recieving this error when trying to create a package for Autocad. Autocad installer installs correctly without intune.
I have trouble determining the version of the executable I downloaded earlier.
Inspecting the properties of IntuneWinAppUtil.exe v1.8.1 gives me the following information:
File version: 6.2006.10.0
Product version : 6.2006.10.0 d0d1b925 Intune-Svc=EMSAgent.develop (AzBuildSC-Ma05.200424-1034)
I can't say for certain that this file is the latest release v1.8.1 by looking at the properties alone. It would be nice to show the release version on the command line , like using -h parameter
IntuneWinAppUtil.exe names the output file after the setup file name. As Intune seems not to like it if you rename the output file manually afterwards, it would be nice to have a command line option to specify a custom name for the output file.
The program lists out the help output when entering a completely valid command with certain executables.
Here I am trying with Adobe Acrobat Reader X:
.\IntuneWinAppUtil.exe -c '.\Adober Reader X\' -s '.\Adober Reader X\AcroRdrDC1800920044_nb_NO.exe' -o .
Which results in IntuneWinAppUtil.exe
to output the help section. Some sane error messages would be very helpful, as I have no idea what could be the issue. This also happened with Visma Document Center.
I have used this tool to create an .intunewin file for the Citrix Workspace App, which in the original .exe file is 144 MB.
When I use this tool, it creates an 8.1 GB .intunewin file.
Why does this happen and what can be done to keep the output file smaller?
Thanks
For example, processing such as copying a file containing double byte in batch file to the desktop causes an error.
As a temporary correspondence, after copying a single-byte file, it is avoided by the process of renaming to double-byte in consideration of usability, but I would like double-byte correspondence as well.
Is it possible to deploy just the catalog files to S Mode? I am having an issue with a program never finishing the install when using silent switches. The installer will run fine if run manually but need the catalog files to allow everything through.
No matter how I run this application I keep getting the below error.
File 'Build\SummerSausage.intunewin' has faield to be generated
[=============================== ] 61% Done!!!
System.InvalidOperationException: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.
at System.Security.Cryptography.SHA256Managed..ctor()
at Microsoft.Management.Service.IntuneWinAppUtil.EncryptUtil.EncryptFile(String file, 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)
The most related issue I can find so far is is this post on stackoverflow. The suggested registry changed do not seem to work, unfortunately.
I have download the "Microsoft-Win32-Content-Prep-Tool-master" from the link https://github.com/Microsoft/Microsoft-Win32-Content-Prep-Tool and i am trying to use the file: Intunewinapputil.exe in windows 10 1803 32 bit operating system. It gives me an error stating the file is not supported. Please help me in resolving this issue and how to launch the application
I'm unable to package a 5GB CAD software due to 4GB file size limit. None of the files inside the archive is above 2GB.
Intune win32 apps are supposed to support up to 8GB packages (according to docs.microsoft.com)
System.IO.InvalidDataException: Entries larger than 4GB are not supported in Update mode. at System.IO.Compression.ZipArchive.Init(Stream stream, ZipArchiveMode mode, Boolean leaveOpen) at System.IO.Compression.ZipFile.Open(String archiveFileName, ZipArchiveMode mode, Encoding entryNameEncoding) at Microsoft.Management.Service.IntuneWinAppUtil.ZipUtil.CreateFromDirectory(String sourceDirectoryName, String destinationArchiveFileName, CompressionOption compressionOption, Boolean includeBaseDirectory, ReportProgress reportProgress) at Microsoft.Management.Service.IntuneWinAppUtil.ZipUtil.ZipFolder(String folder, String zipFile, AppContext context, Boolean noCompression, Boolean includeBaseDirectory) at Microsoft.Management.Service.IntuneWinAppUtil.PackageUtil.CreatePackage(String folder, String setupFile, String outputFolder) at Microsoft.Management.Service.IntuneWinAppUtil.Program.Main(String[] args)
I am unable to run this application on Windows 10 19042.685 64 bit.
###########################################################
From PowerShell windows:
Program 'IntuneWinAppUtil.exe' failed to run: The specified executable is not a valid application for this OS platform. At line:1
char:1
At line:1 char:1
+ CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
+ FullyQualifiedErrorId : NativeCommandFailed
###########################################################
From CMD:
Unsupported 16-Bit Application
The program or feature "??\C:\temp\Packager\IntuneWinAppUtil.exe" cannot stat or run due to incompatibility with 64-bit versions of Windows. Please contact the software vendor to ask it a 64-bit Windows compatible version is available.
###########################################################
I have change the Compatibility Mode that is runs in as part of troubleshooting but still have not ran successfully.
###########################################################
Windows Event Log:
Log Name: Application
Source: Wow64 Emulation Layer
Date: 1/8/2021 2:24:43 PM
Event ID: 1109
Task Category: None
Level: Information
Keywords: Classic
User: N/A
Computer: XXXXXXXXXXX
Description:
The program or feature "??\C:\temp\Packager\IntuneWinAppUtil.exe" cannot start or run due to incompatibity with 64-bit versions of Windows. Please contact the software vendor to ask if a 64-bit Windows compatible version is available.
Event Xml:
1109
0
4
0
0
0x80000000000000
55828
Application
XXXXXXXX
??\C:\temp\Packager\IntuneWinAppUtil.exe
###########################################################
When I load the MSI installer, it is unintentionally set to User and grayed out in the portal. It should be System, so you need the option to ignore it.
Sometimes I have none or multiple setup files to chose from. It would be nice if this was an optional parameter.
If I leave it empty I see this:
"Please specify the setup file:
ERROR The setup file you specified can not be accessed."
If the setup folder or setup file has a space in it's name, the program returns the help message. It is not specified this is expected behavior in the documentation, it also doesn't make sense that it should be a problem.
Paths are properly escaped with quotes when this bug occurs.
Running with the -q option doesn't make any discernible difference in the amount of output. I still see about 20 lines of output indicating all the intermediary steps being performed.
Just trying to display the help returns the following:
Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'IntuneWinAppUtil, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A) ---> System.Security.SecurityException: Strong name validation failed. (Exception from HRESULT: 0x8013141A)
--- End of inner exception stack trace ---
The README.md and the product help ("-h") show this brief description of the "-a" parameter:
-a <catalog_folder> Catalog folder for all catalog files. All files in this folder will be treated as catalog file for Win10 S mode.
I have not been able to find any additional information about this option. Every forum post I have found just says not to use it, but I cannot find any description of when one should use it.
Would you please provide additional content in the README.md and product help—either inline or as a link or links to other documentation—about how this option is intended to be used? This could include any or all of the following:
When the executable is run from a PowerShell command line with the -h parameter all output linese are prepended with "INFO" or "WARN". This is unexpected. See sample is below.
PS C:\Scripts> .\IntuneWinAppUtil.exe -?
INFO Sample commands to use the Microsoft Intune App Wrapping Tool for Windows Classic Application:
INFO IntuneWinAppUtil -h
INFO This will show usage information for the tool.
INFO IntuneWinAppUtil -c <source_folder> -s <source_setup_file> -o <output_folder> <-a> <catalog_folder> <-q>
INFO This will generate the .intunewin file from the specified source folder and setup file.
INFO For MSI setup file, this tool will retrieve required information for Intune.
INFO If -a is specified, all catalog files in that folder will be bundled into the .intunewin file.
WARN If -q is specified, it will be in quiet mode. If the output file already exists, it will be overwritten.
WARN Also if the output folder does not exist, it will be created automatically.
INFO IntuneWinAppUtil
INFO If no parameter is specified, this tool will guide you to input the required parameters step by step.
PS C:\Scripts>
In the new Windows Terminal, the app crashes when trying to update the progress bar:
PS> .\IntuneWinAppUtil.exe -c "c:\install" -s "install.msi" -o "c:\output" -q
Validating parameters
Validated parameters with 14 milliseconds
Compressing the souce folder 'C:\install\' to '...filename.intunewin'
Calculated size for folder 'C:\install' is 74907648 with 1 milliseconds
Compressed folder 'C:\install' successfully with 3451 milliseconds
Checking file type
Checked file type with 185 milliseconds
Encrypting file '...filename.intunewin'
] 42%
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.
Parameter name: targetTop
Actual value was 124.
at System.Console.MoveBufferArea(Int32 sourceLeft, Int32 sourceTop, Int32 sourceWidth, Int32 sourceHeight, Int32 targetLeft, Int32 targetTop, Char sourceChar, ConsoleColor sourceForeColor, ConsoleColor sourceBackColor)
at Microsoft.Management.Service.IntuneWinAppUtil.LogUtil.PrintProgress(AppContext context)
at Microsoft.Management.Service.IntuneWinAppUtil.LogUtil.WriteLine(AppContext context, String text)
at Microsoft.Management.Service.IntuneWinAppUtil.PackageUtil.CreatePackage(String folder, String setupFile, String outputFolder, String catalogFolder)
at Microsoft.Management.Service.IntuneWinAppUtil.Program.Main(String[] args)
When compressing, the message says:
Compressing the souce folder '\\server\share\folder' to 'C:\Users\<User>\AppData\Local\Temp\<guid>\IntuneWinPackage\Contents\IntunePackage.intunewin'
With a misspelling of "souce" instead of "source".
Is there a certain catalog filename or directory name that needs to be used when wrapping your catalog files into Win32 apps for deployment on Windows 10 S Mode?
Logs show no catalog files being detected:
ProcMon shows the management extension looking in a directory that doesn't exist:
But also looks right over the top of the catalogs that do exist:
Keen to understand if I'm missing a step here.
Windows 10 Education S Mode
1909 - 18363.418
Any chance of getting this tool for Linux? I'd like to do the wrapping on a Linux server.
We had bunch of files(XML files,DLL's, exe's, msi's , configuration files,PS1 files) which are placed step by step using powershell. How to convert them into .INTUNEWIN file packages and in background how it works?
The tool crashes if the output is being redirected. Output of IntuneWinAppUtil -c SomeSample -s Setup.exe -o . -q > test.log
:
Unhandled Exception: System.IO.IOException: The handle is invalid.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.Console.set_CursorVisible(Boolean value)
at Microsoft.Management.Service.IntuneWinAppUtil.Program.Main(String[] args)
This is problematic if the tool is being included in automatic (CI) systems when there is no way for the output to be captured (especially in conjunction with #4)
I have tested to add a win32 app and a line-of-business app with the same msi file, the line-of-business app can download and install successfully while the win32 app always failed during downloading.
There are two questions:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.