xPSDesiredStateConfiguration icon indicating copy to clipboard operation
xPSDesiredStateConfiguration copied to clipboard

xPackage should use a PackageType flag to determine package type

Open CaryRoys opened this issue 8 years ago • 0 comments

Currently, it's possible to specify a URL for the Path property.

When doing so, the trailing characters of the URL are used to determine the package type.

This is fine if the URL ends in the literal filename being downloaded (such as *.exe or *.msi), but sometimes URL parameters are needed to authorize the download. When URL parameters are provided after the file name, more often than not it results in an error.

The workaround in the absence of this flag is to add a dummy URL parameter to the end of the URL like so:

Path = "https://go.microsoft.com/fwlink/?linkid=864422&.exe"

Thankfully, most systems just ignore URL parameters they don't recognize.

A flag like so should be included so this workaround needn't be used:

xPackage MyPackage { Path = "Path = "https://go.microsoft.com/fwlink/?linkid=864422" PackageType = "EXE" }

CaryRoys avatar Apr 30 '18 04:04 CaryRoys