aboutsummaryrefslogtreecommitdiff
path: root/installer/process
diff options
context:
space:
mode:
authorVictor Tran <vicr12345@gmail.com>2018-07-13 21:43:04 +1000
committerVictor Tran <vicr12345@gmail.com>2018-07-13 21:43:04 +1000
commita1e9542350cc617412781af88d5b33133d4be8f4 (patch)
tree5991a21047b6ddad55a37b3baedcb45a3b5d91f9 /installer/process
parentb71215ec310ada0694dc76b812ddcaaca0263b4d (diff)
downloadtheInstaller-a1e9542350cc617412781af88d5b33133d4be8f4.tar.gz
theInstaller-a1e9542350cc617412781af88d5b33133d4be8f4.tar.bz2
theInstaller-a1e9542350cc617412781af88d5b33133d4be8f4.zip
Uninstall from Control Panel works now
Diffstat (limited to 'installer/process')
-rw-r--r--installer/process/installworker.cpp14
-rw-r--r--installer/process/removeworker.cpp1
2 files changed, 7 insertions, 8 deletions
diff --git a/installer/process/installworker.cpp b/installer/process/installworker.cpp
index e7708ad..581deb3 100644
--- a/installer/process/installworker.cpp
+++ b/installer/process/installworker.cpp
@@ -103,8 +103,8 @@ bool InstallWorker::startWork() {
dataRoot.insert("appurl", url);
//Write uninstall information to registry
- QUuid uuid = QUuid::createUuid();
- dataRoot.insert("registryUuid", uuid.toString());
+ //QUuid uuid = QUuid::createUuid();
+ dataRoot.insert("registryUuid", name);
/*HKEY SoftwareEntry;
HKEY hive;
LPCWSTR keyPath = (LPCWSTR) QString("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" + uuid.toString()).utf16();
@@ -128,17 +128,17 @@ bool InstallWorker::startWork() {
QSettings* settings;
if (isGlobalInstall) {
- settings = new QSettings("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" + uuid.toString(), QSettings::NativeFormat);
+ settings = new QSettings("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" + name, QSettings::NativeFormat);
} else {
- settings = new QSettings("HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" + uuid.toString(), QSettings::NativeFormat);
+ settings = new QSettings("HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" + name, QSettings::NativeFormat);
}
settings->setValue("DisplayName", name);
settings->setValue("Publisher", vendor);
settings->setValue("Contact", vendor);
- settings->setValue("ModifyPath", dest.absoluteFilePath("uninstall.exe"));
- settings->setValue("UninstallString", dest.absoluteFilePath("uninstall.exe"));
- settings->setValue("InstallDate", QDateTime::currentDateTime().toString("yyyymmdd"));
+ settings->setValue("ModifyPath", "\"" + dest.absoluteFilePath("uninstall.exe").replace("/", "\\") + "\"");
+ settings->setValue("UninstallString", "\"" + dest.absoluteFilePath("uninstall.exe").replace("/", "\\") + "\"");
+ settings->setValue("InstallDate", QDateTime::currentDateTime().toString("yyyyMMdd"));
settings->setValue("InstallLocation", dest.path());
settings->setValue("DisplayIcon", executableFile.absoluteFilePath() + ",0");
settings->sync();
diff --git a/installer/process/removeworker.cpp b/installer/process/removeworker.cpp
index 2bca275..5356f26 100644
--- a/installer/process/removeworker.cpp
+++ b/installer/process/removeworker.cpp
@@ -75,7 +75,6 @@ bool RemoveWorker::startWork() {
dest.removeRecursively();
//Remove registry entry
-
QSettings* settings;
if (metadata.value("global").toBool()) {
settings = new QSettings("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall", QSettings::NativeFormat);