diff options
Diffstat (limited to 'installer/process')
| -rw-r--r-- | installer/process/installworker.cpp | 14 | ||||
| -rw-r--r-- | installer/process/removeworker.cpp | 1 |
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); |
