Compile Batch Files and Scripts for Intune Use | Quisitive
Compile Batch Files and Scripts for Intune Use
July 9, 2015
Read how

In a prior post, How to Customize Office with the Office 365 Click to Run Deployment Tools, I covered a few basics of customizing an Office 365 Click to Run install beyond what is supported in the standard configuration.xml file by using a simple Batch (.bat) file.

Since Intune doesn’t support processing Batch files or VBS files, today I’m covering how to compile your scripts and batch files into a self contained executable.

There are hundreds of tools out there to compile executable, but we’re going to use the one Microsoft provided along with Windows, the Iexpress Wizard.

Intune Scripts and Files

  1. Run iexpress.exe as an Administrator
  2. Use the default of “Create new Self Extraction Directive file.”
  3. Use the default of “Extract files and run an installation command”
  4. Name your project.
  5. Select if you want to provide a prompt.
  6. Provide a license prompt if desired.
  7. Add the customized batch file, setup.exe and the customized configuration.xml file. If other files are included, make sure they all have a unique files.
  8. Select the custom batch file for the installation command. Make sure to add the cmd.exe /c as below.
  9. Select the focus of the app, in this case we will be using Hidden.
  10. Provide a finished message if desired.
  11. Provide a path to save the executable. I’ve run into odd scenarios when saving outside of the work folder where the other files reside, as such I recommend saving the executable in the same folder and not using any spaces.
  12. Configure if a restart is desired.
  13. Save your Self Extraction Directive
  14. Click next to create the package.
  15. Done!

You now have a single .exe that can be run without parameters and can be delivered via Intune.