simeoncloud / IntuneAppBuilder

A cross platform, Intune application packaging and deployment console tool and SDK :zap:
https://simeoncloud.com
Apache License 2.0
60 stars 3 forks source link

Issue when packaging folders which dont have .msi in it #40

Closed Joly0 closed 11 months ago

Joly0 commented 11 months ago

Hey, i am trying out your tool and i got a folder with powershell script in it. I tried to set the source dfirectly to the path of the powershell script, but that didnt work. I get an error because the source wasnt an msi file, so i tried setting just the directory as a source. That kinda worked, but i had 3 files with no name, just the file extension. Why is it even necessary for the source to be an msi file? I´d imagine this is because the msi file contains information that can be stored in the json file to publish? But then it should also be allowed to set any opther file extension as a source aswell, so the file name is correctly used. So .exe, .ps1, .bat, .cmd etc should all work as they are used quite often for intune

Lance-Simeon commented 11 months ago

Hi @Joly0.

IntuneAppBuilder does support PowerShell files! To package ps1 files simply put the files in a directory then use the pack command with the --source pointing to the directory of the ps1 file. As follows:

IntuneAppBuilder pack --source ".\DirectoryWithPowerShellFiles"

The above command will create an intunewin package with the contents of the source folder. Please let me know if you have other questions

Joly0 commented 11 months ago

I know this process, i already wrote, that i tried that and it worked, but the output is a .intunewin file without a name. Thats quite odd imo

Lance-Simeon commented 11 months ago

What is the source you are using in the command? When I try this, the intunewin package's name is the name of the folder where the scripts exist.

Joly0 commented 11 months ago

Hm, its weird, i literally cant replicat that anymore today. The command i used was this: IntuneAppBuilder pack -s "R:\Intune - Apps\KeePassNatMsg - v2.0.16" with an install.ps1 script and a keepass plugin in that folder

Lance-Simeon commented 11 months ago

Strange that you are no longer able to reproduce. Good to hear its working now. Ill close this issue for now, but please let us know if you see it again.