From 79f534273fcd08cbd64280d11d336feac5d8770c Mon Sep 17 00:00:00 2001 From: Xinyu Hou Date: Wed, 26 Nov 2014 16:42:32 +0000 Subject: [PATCH] Ran Bonjour installer in passive mode --- src/gui/src/MainWindow.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/gui/src/MainWindow.cpp b/src/gui/src/MainWindow.cpp index 0fff11cf..09b505ba 100644 --- a/src/gui/src/MainWindow.cpp +++ b/src/gui/src/MainWindow.cpp @@ -54,7 +54,7 @@ static const QString synergyConfigFilter(QObject::tr("Synergy Configurations (*. static const char bonjourUrl[] = "http://synergy-project.org/bonjour/"; static const char bonjour32Url[] = "http://synergy-project.org/bonjour/Bonjour.msi"; static const char bonjour64Url[] = "http://synergy-project.org/bonjour/Bonjour64.msi"; -static const char bonjourInstaller[] = "BonjourSetup.exe"; +static const char bonjourInstaller[] = "BonjourSetup.msi"; #else static const char synergyConfigName[] = "synergy.conf"; static const QString synergyConfigFilter(QObject::tr("Synergy Configurations (*.conf);;All files (*.*)")); @@ -1109,7 +1109,14 @@ void MainWindow::installBonjour() file.write(m_pDataDownloader->downloadedData()); file.close(); - QDesktopServices::openUrl(QUrl("file:///" + filename)); + QProcess process; + QStringList arguments; + arguments.append("/i"); + QString winFilename = QDir::toNativeSeparators(filename); + arguments.append(winFilename); + arguments.append("/passive"); + process.start("msiexec", arguments); + process.waitForFinished(); m_DownloadMessageBox->hide(); #endif