Skip to content

Commit

Permalink
fix log messages in quickAccess Service
Browse files Browse the repository at this point in the history
  • Loading branch information
infeo committed Jul 16, 2024
1 parent ae6180c commit 5b6e2f2
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,20 +85,20 @@ public QuickAccessEntry add(Path target, String displayName) throws QuickAccessS
//10. Set SFGAO attributes for the shell folder
shellFolderKey.setDwordValue("Attributes", 0xF080004D);
}
LOG.trace("Created RegKey {} and subkeys, including Values", baseKey);
LOG.trace("Created RegKey {} and subkeys, including Values", baseKey.getPath());
}

//11. register extenstion in name space root
var nameSpaceSubKey = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\" + clsid;
try (var nameSpaceKey = t.createRegKey(RegistryKey.HKEY_CURRENT_USER, nameSpaceSubKey, true)) {
nameSpaceKey.setStringValue("", entryName, false);
LOG.trace("Created RegKey {} and setting default value", nameSpaceKey);
LOG.trace("Created RegKey {} and setting default value", nameSpaceKey.getPath());
}

//12. Hide extension from Desktop
try (var newStartPanelKey = t.createRegKey(RegistryKey.HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\HideDesktopIcons\\NewStartPanel", true)) {
newStartPanelKey.setDwordValue(clsid, 0x1);
LOG.trace("Set value {} for RegKey {}", clsid, newStartPanelKey);
LOG.trace("Set value {} for RegKey {}", clsid, newStartPanelKey.getPath());
}
t.commit();
} catch (WindowsException e) {
Expand Down Expand Up @@ -131,13 +131,13 @@ public synchronized void remove() throws QuickAccessServiceException {

//undo step 12.
try (var nameSpaceKey = t.openRegKey(RegistryKey.HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\HideDesktopIcons\\NewStartPanel")) {
LOG.trace("Removing Value {} of RegKey {}", clsid, nameSpaceKey);
LOG.trace("Removing Value {} of RegKey {}", clsid, nameSpaceKey.getPath());
nameSpaceKey.deleteValue(clsid, true);
}

//undo everything else
try (var baseKey = t.openRegKey(RegistryKey.HKEY_CURRENT_USER, "Software\\Classes\\CLSID\\" + clsid)) {
LOG.trace("Wiping everything under RegKey {} and key itself.", baseKey);
LOG.trace("Wiping everything under RegKey {} and key itself.", baseKey.getPath());
baseKey.deleteTree("");
}
t.deleteRegKey(RegistryKey.HKEY_CURRENT_USER, "Software\\Classes\\CLSID\\" + clsid, true);
Expand Down

0 comments on commit 5b6e2f2

Please sign in to comment.