can someone please assist me with allowing the user to choose where they would like to install the chocolatey package? i am looking around and experimenting with different types of code but have not been able to get it to work properly
$ErrorActionPreference = ‘Stop’;
$packageName = ‘dismgui’
$url = ‘https://github.com/mikecel79/DISMGUI/releases/download/4.0/DISM.GUI.zip’
$checksum = ‘0DA4B2F08424CECA3EA1F4996566366B27C9B5A6E1C0EF37E89BA1224BF91041’
$installDir = ‘{0}dismgui’ -f $Env:SystemDrive
$packageArgs = @{
packageName = $packageName
url = $url
checksum = $checksum
checksumType = ‘sha256’
unzipLocation = $installDir
}
$additionalArgs = Get-PackageParameters
if($additionalArgs[‘InstallDir’]) {
$installDir = $additionalArgs[‘InstallDir’]
}
Install-ChocolateyZipPackage @packageArgs