Best way to deploy folders including and a .bat file for software installation?

One of our software vendors provide a zip folder that included the files & folders needed for the installation and a Start.bat to run the installer. I'm used to getting .exe or .msi files from our vendors but trying to get this wrapped and deployed via Intune/Company Portal.

Currently trying to use the Copy-ADTFile command to copy the files over but having issues with the .bat file running to complete the installation.

If there aren't many files in the ZIP file I would place them in PSADT's Files folder.
If there are many little files (50+) you will want to extract the ZIP files during installation
The catch, PSADT does not have a Extract-ZIP function.
PowerShell has something but I vaguely remember it was .Net based and was flaky.

From there you could launch the Bat file using PSADT.
The catch: If the bat file fails or runs into issues, you will never know.

you are better to translate the .Bat to PowerShell with PSADT functions.
But you will have know what you are doing.

(Moved your post to catch more eyeballs)

1 Like

If a vendor supplies a bat file, I usually want to convert this into PS. Unless it's straight forward, I just paste the contents of the bat into ChatGPT and ask it to convert it into PS then take what I need from it and place it in the PSADT script.

When we've got lots of tiny files in a package, we zip them up and include 7zip.exe and 7zip.dll in 'SupportFiles' to do the unzipping.

By the way: I consider PSADT v4 to be "lot of little files" and slow for MECM to download, so for months now we've been successfully deploying packages with the PSADT module folder zipped up and have it extract as PSADT initialises. And for that extraction process, I use the native powershell function "Expand-Archive", with some tests/checks around it. Works great.
PSADTv4 Slow to Cache/Copy - The Toolkit / General Discussion - PSAppDeployToolkit Community

1 Like

I remember your commentary at the time here. Improvements have been made, as you'll be able to see in this pre-release: Don't fail out if `$fqPath` is null when `-UseShellExecute` is true. · PSAppDeployToolkit/PSAppDeployToolkit@a210dcb · GitHub. There'll possibly be a further reduction of the DLL files before the next release as well.

2 Likes