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

wmic product where name="FileBot" call uninstall /nointeractive

This commit is contained in:
Reinhard Pointner 2016-02-27 03:27:37 +00:00
parent f27325a458
commit 66fa39af25

View File

@ -98,26 +98,26 @@ Var MSI_STATUS
Section MAIN
DetailPrint "Uninstalling previous versions..."
nsExec::Exec `Powershell.exe -inputformat none -noprofile -windowstyle hidden -Command "(Get-WmiObject -Class Win32_Product -Filter \"Name = 'FileBot'\").uninstall()"`
nsExec::Exec `wmic product where name="FileBot" call uninstall /nointeractive`
DetailPrint "Downloading latest version..."
${if} ${RunningX64}
inetc::get /USERAGENT "nsis" /caption "Downloading FileBot (64-bit)" "https://app.filebot.net/download.php?type=msi&arch=x64" "$PLUGINSDIR\FileBot.msi" /end
${else}
inetc::get /USERAGENT "nsis" /caption "Downloading FileBot (32-bit)" "https://app.filebot.net/download.php?type=msi&arch=x86" "$PLUGINSDIR\FileBot.msi" /end
${endif}
DetailPrint "Installing latest version..."
nsExec::Exec `msiexec /passive /norestart /i "$PLUGINSDIR\FileBot.msi"`
Pop $MSI_STATUS # grab return value
${if} $MSI_STATUS == "0"
DetailPrint "Optimizing..."
nsExec::Exec `"C:\Program Files\FileBot\filebot.exe" -script "g:java.util.prefs.Preferences.userRoot(); net.sf.ehcache.CacheManager.getInstance().clearAll(); net.filebot.media.MediaDetection.warmupCachedResources();"`
nsExec::ExecToLog `"C:\Program Files\FileBot\filebot.exe" -script "g:println net.filebot.Settings.applicationIdentifier; java.util.prefs.Preferences.userRoot(); net.sf.ehcache.CacheManager.getInstance().clearAll(); net.filebot.media.MediaDetection.warmupCachedResources();" --log OFF`
DetailPrint "Done."
${else}
DetailPrint "msiexec error $MSI_STATUS"
DetailPrint "Install failed. Please download the .msi package manually."
DetailPrint "Installation failed. Please download the .msi package manually."
Abort
${endif}
SectionEnd