If you have a bat file that you want to deploy via IM you need to use winrar in order to create a SFX archive. Bellow are the steps that you need to take to make a successful deployment package.
1. Right click on the bat file and select add to archive:
2. Make sure that you check the SFX box
3. Under advanced you have the SFX options
4. Under the SFX option you must first select the path where you want the bat file to be decompressed
5. Under Setup you must write the name of the bat file, so that it will be launched after it is uncompressed.
6. Under Modes menu you can choose to hide the interface. This is recommended.
After you finished completing all the steps above you can then create the SFX archive. This will be an .exe file that can be afterwards encrypted with the Heimdal Encryption tool and then you can create a patch in IM with this file to deploy in your organization. When creating the Heimdal IM patch, please select the silent argument to be /S
After you have successfully encrypted the SFX archive you can then proceed to upload it to IM. After a successful upload, you will need to create the patch
You can specify any name that you want for the app and also architecture. Please note that the custom expression here does not matter since this is not a program that will be installed and it will not appear in Control Panel, so in this case I have put new as an argument.
Next step is to create the patch:
After adding the patch, we need to set the version and, in this case, since we do not install an app, it can be anything, so I put there 1. The silent argument should be /S in this case.
Last step is to select the desired windows version and save the patch:
Now you can deploy the script thru IM. You must go to the desired group policy and add the new patch
You must check the first box, so that Heimdal will push the bat file to the PC-s.