?
Solved

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

Posted on 2003-03-14
2
Medium Priority
?
165 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

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…
This is a fine trick which I've found useful many times, when you just don't want to accidentally run a batch script or the commands needs administrator rights.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

770 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