diff options
| author | Victor Tran <vicr12345@gmail.com> | 2018-07-13 21:43:04 +1000 |
|---|---|---|
| committer | Victor Tran <vicr12345@gmail.com> | 2018-07-13 21:43:04 +1000 |
| commit | a1e9542350cc617412781af88d5b33133d4be8f4 (patch) | |
| tree | 5991a21047b6ddad55a37b3baedcb45a3b5d91f9 /installer/process/installworker.cpp | |
| parent | b71215ec310ada0694dc76b812ddcaaca0263b4d (diff) | |
| download | theInstaller-a1e9542350cc617412781af88d5b33133d4be8f4.tar.gz theInstaller-a1e9542350cc617412781af88d5b33133d4be8f4.tar.bz2 theInstaller-a1e9542350cc617412781af88d5b33133d4be8f4.zip | |
Uninstall from Control Panel works now
Diffstat (limited to 'installer/process/installworker.cpp')
| -rw-r--r-- | installer/process/installworker.cpp | 14 |
1 files changed, 7 insertions, 7 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(); |
