Add UAC warning if install fails.

This commit is contained in:
NissimHadar 2018-09-30 17:11:01 -07:00
parent dd8d651c69
commit 632f6647dd
2 changed files with 18 additions and 0 deletions

View file

@ -155,6 +155,8 @@ void TestRunner::runInstaller() {
} }
void TestRunner::installationComplete() { void TestRunner::installationComplete() {
verifyInstallationSucceeded();
createSnapshotFolder(); createSnapshotFolder();
updateStatusLabel("Running tests"); updateStatusLabel("Running tests");
@ -166,6 +168,21 @@ void TestRunner::installationComplete() {
runInterfaceWithTestScript(); runInterfaceWithTestScript();
} }
void TestRunner::verifyInstallationSucceeded() {
// Exit if the executables are missing.
// On Windows, the reason is probably that UAC has blocked the installation. This is treated as a critical error
#ifdef Q_OS_WIN
QFileInfo interfacExe(QDir::toNativeSeparators(_installationFolder) + "\\interface.exe\"");
QFileInfo assignmentClientExe(QDir::toNativeSeparators(_installationFolder) + "\\assignment-client.exe\"");
QFileInfo domainServerExe(QDir::toNativeSeparators(_installationFolder) + "\\domain-server.exe\"");
if (!interfacExe.exists() || !assignmentClientExe.exists() || !domainServerExe.exists()) {
QMessageBox::critical(0, "Installation of High Fidelity has failed", "Please verify that UAC has been disabled");
exit(-1);
}
#endif
}
void TestRunner::saveExistingHighFidelityAppDataFolder() { void TestRunner::saveExistingHighFidelityAppDataFolder() {
QString dataDirectory{ "NOT FOUND" }; QString dataDirectory{ "NOT FOUND" };

View file

@ -42,6 +42,7 @@ public:
void installerDownloadComplete(); void installerDownloadComplete();
void runInstaller(); void runInstaller();
void verifyInstallationSucceeded();
void saveExistingHighFidelityAppDataFolder(); void saveExistingHighFidelityAppDataFolder();
void restoreHighFidelityAppDataFolder(); void restoreHighFidelityAppDataFolder();