I updated to v3.6.9 to see if my 3.6.4 was the problem but it is not and errors the same on WIN10 and WIN7.
I pool registry to get 7-zip ininstall path set it to a variable for use later. echo the results and I get what I expect to see (a valid path) C:\Program Files (x86)\7-Zip\Uninstall.exe"
but when attempting to run this:
[String]$x86ver = Get-RegistryKey “HKLM:Software\Microsoft\Windows\CurrentVersion\Uninstall\7-Zip” -Value “UninstallString”
[String]$x64Ver = Get-RegistryKey “HKLM:Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\7-Zip” -Value “UninstallString”
If ($x86ver -or $x64Ver){
Show-InstallationProgress -StatusMessage "Removing previous versions of $AppName."
# uninstall the application
If ($x86ver){
write-host $x86Ver
Execute-Process -Path $x86ver -Parameters ' /S'}
If ($x64ver){
write-host $x64Ver
Execute-Process -Path $x64ver -Parameters ' /S'}
}
Remove-MSIApplications -Name '7-Zip'
I end up with the below errors.
[08-07-2017 12:18:19.072] [Pre-Installation] [Execute-Process] :: Function failed, setting exit code to [60002].
Error Record:
Message : Exception calling “IsPathRooted” with “1” argument(s): “Illegal characters in path.”
InnerException : System.ArgumentException: Illegal characters in path.
at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
at System.IO.Path.IsPathRooted(String path)
at CallSite.Target(Closure , CallSite , Type , Object )
FullyQualifiedErrorId : ArgumentException
ScriptStackTrace : at Execute-Process<Process>, C:\WINDOWS\Brunswick\AppDeployToolkit\AppDeployToolkitMain.ps1: line 2707
at <ScriptBlock>, C:\Temp\16.04\Deploy-7-Zip-16.04.ps1: line 153
PositionMessage : At C:\WINDOWS\Brunswick\AppDeployToolkit\AppDeployToolkitMain.ps1:2707 char:8
+ … If (([IO.Path]::IsPathRooted($Path)) -and ([IO.Path]::HasExte …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error Inner Exception(s):
Message : Illegal characters in path.
InnerException :
If I change things to use native cmds they work:
[String$x86ver = Get-RegistryKey "HKLM:Software\Microsoft\Windows\CurrentVersion\Uninstall\7-Zip" -Value "UninstallString"
[String]$x64Ver = Get-RegistryKey "HKLM:Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\7-Zip" -Value "UninstallString"
If ($x86ver -or $x64Ver){
Show-InstallationProgress -StatusMessage "Removing previous versions of $AppName."
# uninstall the application
If ($x86ver){
write-host $x86Ver
Start-Process -FilePath $x86ver -ArgumentList ' /S' -Wait}
If ($x64ver){
write-host $x64Ver
Start-Process -FilePath $x64ver -ArgumentList ' /S' -Wait}
}
Remove-MSIApplications -Name '7-Zip'
Anyone else experiencing this??
LOVE this tool