diff --git a/installer/nsis/filebot.nsi b/installer/nsis/filebot.nsi index 79ecd667..09a7f786 100644 --- a/installer/nsis/filebot.nsi +++ b/installer/nsis/filebot.nsi @@ -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