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

Fix to convert AllowAvailableUninstall of Add-IntuneWin32App parameter #54

Closed kenchan0130 closed 4 months ago

kenchan0130 commented 5 months ago

Fix #53

aaronparker commented 5 months ago

A better fix might be to update the AllowAvailableUninstall value in the App.json to a boolean, the code fix should not then be needed.:

  "Program": {
    "InstallTemplate": "Deploy-Application.exe -DeploymentType \"Install\" -DeployMode \"Silent\"",
    "InstallCommand": "Deploy-Application.exe -DeploymentType \"Install\" -DeployMode \"Silent\"",
    "UninstallCommand": "Deploy-Application.exe -DeploymentType \"Uninstall\" -DeployMode \"Silent\"",
    "InstallExperience": "system",
    "DeviceRestartBehavior": "suppress",
    "AllowAvailableUninstall": "false"
  },

to:

  "Program": {
    "InstallTemplate": "Deploy-Application.exe -DeploymentType \"Install\" -DeployMode \"Silent\"",
    "InstallCommand": "Deploy-Application.exe -DeploymentType \"Install\" -DeployMode \"Silent\"",
    "UninstallCommand": "Deploy-Application.exe -DeploymentType \"Uninstall\" -DeployMode \"Silent\"",
    "InstallExperience": "system",
    "DeviceRestartBehavior": "suppress",
    "AllowAvailableUninstall": false
  },
kenchan0130 commented 5 months ago

@aaronparker I agree there’s no need to handle boolean values as strings. Since the DetectionRule.Check32BitOn64System of App.json adopted string for bool values, I have adapted the current configuration file format.

If it is acceptable to use the bool type in the configuration file, I will change it that way.

kenchan0130 commented 5 months ago

@aaronparker I have taken additional measures for this issue. Cloud you review?

kenchan0130 commented 4 months ago

@aaronparker This is just a friendly reminder that I am waiting for your review.