aaronparker / packagefactory

A packaging factory for Microsoft Intune using Evergreen, VcRedist, and IntuneWin32App
https://stealthpuppy.com/packagefactory/
MIT License
63 stars 18 forks source link

Added more Logging Capabilities in Install.ps1 and Uninstall.ps1 and added error handling in Create-Win32App.ps1 #15

Closed Constey closed 1 year ago

Constey commented 1 year ago

Hi Aaron,

I thought it would be nice to have a separat log file for the run in install.ps1 and uninstall.ps1 for troubleshooting. Looking in the own Log files is much easier than using the intune default, so i've added a bit - hope you like it.

Aswell in Create-Win32App i've added error handling if you specify a Install.ps1 in the app.json but the file is not in the source folder, so the package will be created without and intune will run in an issue, because it could not execute sth :-)

So if we can now additionally specify an custom-setup.ps1 or sth. like that in the install.json to run additional setup/modifications, we can leave the install.ps1 for most packages default. Same we could overthink with the uninstall process. this could be aswell specified in the install.json and the uninstaller.ps1 will use that params out there.

Aswell for msi packages we could use automated GUID extraction for the Uninstallation command msiexec /x - to avoid mistakes from user input and so one. Damn so many ideas, sorry for writing a book ;-)

Kind regards, Constantin

aaronparker commented 1 year ago

I'll take a look over the next few days. Are we re-writing the PSAppDeployToolkit if we keep extending the solution?

I hadn't used the PSAppDeployToolkit because development looks to have stalled I'm not a fan of how the install/uninstall logic is embedded directly into the deploy-application.ps1

Constey commented 1 year ago

I'll take a look over the next few days. Are we re-writing the PSAppDeployToolkit if we keep extending the solution?

I hadn't used the PSAppDeployToolkit because development looks to have stalled I'm not a fan of how the install/uninstall logic is embedded directly into the 'deploy-application.ps1'

Well rewriting is maybe a bit oversized. I'm aswell not a fan of complex frameworks for a (sometimes) easy msi install :-) But I like the combination of Packagefactory + Evergreenn to push Updates directly into Intune. I've tested a lot in Vmware WS1. There is msi deployment possible like a god. Just upload it and it fetches automatically the ID's for the uninstall command and presents you the defaults where you can simply add some more switches.