DelphiFAQ Home Search:

The registry editor does not work - it closes itself!


comments63 comments. Current rating: 4 stars (11 votes). Leave comments and/ or rate it.


I believe to have a virus or malware on my computer and want to clean it up in the registry. But I cannot open the registry editor - the registry editor closes upon about 5 seconds to opening it. So I keep opening registry editor and every time I opened it, about 5 seconds later it closes itself.


Many trojan horses, viruses and other malwares make changes to the registry. They may one or more of the shellopencommand keys. By changing these keys they can make themselves be executed each time that you 'open' a certain type of file e.g. if they modified the exefileshellopencommand key then the trojan will be invoked every time you start any (!) executable file.

One common trick is to disable the registry editor, so that it is more difficult for you to get rid of the trojan horse. Yes, Microsoft provides such a key in the registry - under


you will find an entry DisableRegistryTools which can be 0 or 1. By default this entry does not even exist which means you are allowed to edit the registry.

Here is an installer script which you can download and have it execute and it should restore your original settings. It does not do any magic. It will simply reset the shell open command for executable files:
.exe, .com, .bat, .pif, .scr (screensavers!)
and also for .reg files (registry data files).

Further on it will re-enable editing the registry alltogether and make sure that the application associated with registry batch files (*.reg) is indeed the official registry editor and not some trojan horse.

  1. download this file by right-clicking on the link and save it to your desktop
  2. right-click on the file and select 'install'

It will not display any success message but your registry editor will work now again.

It is important that you right-click on the link and save the file as described. If you just click on it, it will probably open in Notepad. (You could save it from there to the desktop though.)

Content-type: text/html


You are on page 4 of 5, other pages: 1 2 3 [4] 5
2007-09-10, 05:36:28
anonymous from United Kingdom  
I have the issue of not being able to run any .exe files. There seems to be plenty of help available online, but all the help relates to downloading a small EXE file and I cant run it, this is my problem.

When I try to run a program including the download offered here (right click and install) I get the same message from windows as follows:

'Windows cannot open this file:
What do you want to do?

Option#1: Use a web service to find the appropriate program - useless!!
Option #2: Select a program from the list.

Option #2 - Is there a program I can navigate to within my local folders that will assist in launching MS-DOS / Windows programs like regedit?

I've tried loads of ways to open regedit, but with no results.

So I am asking if there is an alternative to downloading an exe file?

Many thanks in advance.
2007-12-09, 00:09:44
I was able to open my registry after running the script, i should be able to enable my task manager now.
Thanks pal...
2008-02-01, 00:14:58
anonymous from India  
2008-02-01, 00:16:05 from India  
2008-02-13, 04:59:57
Niraj,Guna from Lamba, India  

It helped me a lot. My Computer was infected with W32.Svich virus and it blocked my taskmanager and regedit. Your file really helped me. Thanx once again.
2008-02-23, 08:19:26
anonymous from Thailand  
Very good Thank U.
2008-02-23, 19:04:06   (updated: 2008-02-23, 19:18:26)  
You may Clean any viruses and then try to run script UnHookExecOpen.inf given above in Instructions. It normally should work.
Jayachandra, India

2008-04-19, 10:49:27
i am vinod....
u hav done a wonderful job even the rich microsoft doesnt do for their customers...

thank u for ur support
vinodh from india
2008-05-18, 03:17:24 from Sudan  
thanks allot,I got my registry editor back !!!
but what about restoring windows task manager
2008-05-24, 23:27:38
hey thanx my registry opening now.
my antivirus not detecting any trojan.then what caused that to occur.where is the virus to get rid of it.
2008-06-15, 16:29:04
anonymous from United States  
magic thank you so much
2008-12-06, 09:06:00
realspenz from Philippines  
when i right click, install doesn't appear. i'm using windows xp
2009-06-04, 04:45:07 from Netherlands  
about not being able to install: after I downloaded the file, it was on my desktop with the extention '.txt'. So: 'UnHookExecOpen.inf.txt'. After removing '.txt' it could be installed.
greetings, Henk
2009-09-10, 01:41:25
anonymous from Imphal, India  
whenever my computer get starts ,one message is coming'Disable registry tools added sothat Register editor will not work.we recommend you to choose delete option.Two options are there to select-''Delete' and 'Accept'.What should i do?pls help?
2009-09-16, 01:32:50
[hidden] from Sydney, Australia  
i have tried using the .inf file and clicking install and nothing happens, when i open regisrty etitor from 'run' it opens then closes after about a second.
You are on page 4 of 5, other pages: 1 2 3 [4] 5



NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: