How can I delete a registry key for other program, I just checked my registry and the virus was registered under the same registry key of my other program and now I want to use java as also part of learning java and the method of accessing and deleting a particular registry.
Any suggestion, link, structure code will be appreciated.
Process g = new ProcessBuilder("reg.exe", "REG", "DELETE", "HKLM\Software\Microsoft\Windows\CurrentVersion\Test", "/f").start();
I tried it without the "/f" which is force the deletion without asking for confirmation but still it doesn't work. I also tried combining the code but still nothing. Sorry for not formatting the code snip I'm using Cell phone and the panel is not visible that enable me to format the code.
Oh yeah, Dani's new thread editor tries to be smart about special characters. It makes sense to her, but drives me mad too.
In that case just getting rid of the "REG" should help.
Capturing/echoing the output from the process will help diagnose problems, if you're not already doing that.
Sorry for the duplication of posts, I had a problem when I was posting. Thanks that help in deleting the registry key but now the problem is that if I put the program on the same path that was registered meaning "C:\test" if I just put my app on that folder after I've deleted the registry and restart the computer the program still execute automatically I don't know why.