aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/installer
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2019-05-08 10:54:28 +0200
committerSimon Rozman <simon@rozman.si>2019-05-08 10:54:55 +0200
commita06a993d868766f2b7faaf9fbde8ceee37f696e6 (patch)
tree031c2283a87c1f9727d425ebb924606138c54406 /installer
parentconfview: show in the case that there are no peers (diff)
downloadwireguard-windows-a06a993d868766f2b7faaf9fbde8ceee37f696e6.tar.xz
wireguard-windows-a06a993d868766f2b7faaf9fbde8ceee37f696e6.zip
installer: smarter detection of SYSTEM profile folder
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'installer')
-rw-r--r--installer/customactions.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/installer/customactions.js b/installer/customactions.js
index 9ca93ca5..1647c20e 100644
--- a/installer/customactions.js
+++ b/installer/customactions.js
@@ -90,7 +90,9 @@ function EvaluateWireGuardServices() {
function RemoveConfigFolder() {
try {
- fso.DeleteFolder(fso.BuildPath(fso.GetSpecialFolder(1), "config\\systemprofile\\AppData\\Local\\WireGuard"), true);
+ var path = wsh.RegRead("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\S-1-5-18\\ProfileImagePath");
+ path = wsh.ExpandEnvironmentStrings(path.toString());
+ fso.DeleteFolder(fso.BuildPath(path, "AppData\\Local\\WireGuard"), true);
} catch(e) {
logMessage("Failed to remove configuration on uninstall: " + e.message);
}