?
Solved

Remove an entry in the registry with a script and run it autmatically

Posted on 2003-03-14
2
Medium Priority
?
166 Views
Last Modified: 2012-05-04
Hi,

i need a script (maybe a .inf file ?) to remove an entry like:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\MyProgram
from the registry file

and I would like to run it automatically when "MyProgram" closes or when win2k shuts down.

is there a way to do it ?

Many Thanks,
Francesco

PS Sorry for my bad english
0
Comment
Question by:sunlight76
2 Comments
 
LVL 34

Accepted Solution

by:
sramesh2k earned 200 total points
ID: 8135425
Create a reg file: Copy the contents of the file to text file and save as "remover.reg" in the C:\ root directory.

Windows Registry Editor Version 5.00

[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\
CurrentVersion\Uninstall\MYPROGRAM]


Now, create a batch file called clear.bat. The contents of the file would be:
"regedit.exe /s c:\remover.reg" (without quotes)

Now, goto start|run|gpedit.msc
>Windows Settings>SCripts>ShutdownScript> browse and locate the clear.bat file

Now, at every shutdown the above mentioned key should be deleted.
0
 

Author Comment

by:sunlight76
ID: 8150393
Thanks, It worked fine!

Francesco
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Google webmaster tool or Google search console is an imperative tool for solving different website relevant issues. The amazing features of this tool greatly help to check the indexing and improve the visibility of the site.
Integration Management Part 2
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question