So I'm using the WinRegistry class, found in an answer on this page.
I need to stop my JAR file showing up in LastActivityViewer - which apparently uses Registry Keys to obtain it's information. Now on this site, it explains which registry keys to delete.
I specifically need to clear; Windows Prefetch Folder, Open/Save MRU list in the registry and the Windows Shell Bag Registry (you will understand if you look at the site I linked).
So this much I've figured out, but basically, the WinRegistry class has a deleteKey and deleteValue method which I can use - but how do I know the parameters that I should enter / which method to use?
Please help me on this; I've been looking everywhere and cannot seem to find an answer.
Proof of research: Finding a specific registry key using java in windows https://coderanch.com/t/517229/java/Editing-reading-windows-registry-java
Disclaimer: I've tried to word this question as understandable as possible. If it isn't clear then please leave a comment about what is unclear.
try {
//ls = WinRegistry.readStringSubKeys(WinRegistry.HKEY_CURRENT_USER,
// "Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\");
WinRegistry.deleteKey(WinRegistry.HKEY_CURRENT_USER,
"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ComDlg32\\OpenSavePidlMRU\\jar");
} catch (Exception ex) {
ex.printStackTrace();
}
This is returning a NPE -> will try to fix, but in the meanwhile any help appreciated.
EDIT: I've been looking through regedit and I found this; OpenSavePidlMRU folder which contains "exe, jar, jpg, png" etc inside. I used the RegistryWin.deleteKey method and the jar file disappeared from the registry - this is a good thing but is it dangerous?