1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-16 22:35:04 -05:00

* try to uninstall previous packages before install using powershell

This commit is contained in:
Reinhard Pointner 2013-12-26 05:29:39 +00:00
parent d56fc9b368
commit 9c41231af1

View File

@ -296,6 +296,8 @@ Section "$(Section_Name_MainProduct)" SECTIONID_MAINPRODUCT
; there's some code in the .onInit callback that prevents
; the user from disabling this section on the components
; selection screen.
DetailPrint "Uninstalling previous versions..."
nsExec::Exec `Powershell.exe -inputformat none -noprofile -windowstyle hidden -Command "(Get-WmiObject -Class Win32_Product -Filter \"Name = 'FileBot'\").uninstall()"`
DetailPrint "Downloading latest version..."
;Install latest FileBot
@ -306,7 +308,7 @@ Section "$(Section_Name_MainProduct)" SECTIONID_MAINPRODUCT
${endif}
DetailPrint "Installing latest version..."
nsExec::Exec 'msiexec /passive /i "$PLUGINSDIR\FileBot.msi"'
nsExec::Exec `msiexec /passive /i "$PLUGINSDIR\FileBot.msi"`
Pop $MSI_STATUS # grab return value
${if} $MSI_STATUS == "0"