PSAppDeployToolkit icon indicating copy to clipboard operation
PSAppDeployToolkit copied to clipboard

Shortcut functions should use "ValidateNotNull" not "ValidateNotNullorEmpty"

Open GeoSimos opened this issue 1 year ago • 0 comments

This is a change request for the Shortcuts creation functions.

I was creating some shortcuts the other day by using a CSV with their data but not all parameters were required and the DeployApplication.ps1 script was throwing an error that the parameters can't be null or empty.

I checked the code in the toolkit script and changed the parameters that I needed to be "ValidateNotNull" instead of "ValidateNotNullorEmpty". If you think about it a bit, not all parameters are required for a properly operating shortcut such as:

  1. IconLocation
  2. IconIndex
  3. Arguments
  4. RunAsAdmin
  5. WindowStyle
  6. HotKey
  7. Working Directory (for URL shortcuts) So having those as ValidateNotNull they can be empty and accepted.

Would you consider this change for a future release please?

Thank you for your great work!

GeoSimos avatar Mar 29 '24 16:03 GeoSimos