Deleting a File from Hardrive and Deleting a SubKey in Registry

H

Harry Barker

Hi Group

I Have to complete a small project and i need you guys help in doing
it. I have to create a Tool that will automatically delete a file from
the Harddrive and also deleting a SubKey from the registry. Before
doing the same, the tool have to check the version of Windows.

Ex:

For Example if you guys could suggest me a coding where i can delete
the following.

Have to Delete SaveNow from ProgramFiles location in the harddrive

%ProgramFiles%\SaveNow\SaveNow.exe

Have to Delete SaveNow from the SubKey Uninstall

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\SaveNow

If you guys can help me in this that will be great. If you have any
queries please to reply me. Thanks in Advance.

Harry Barker
 
P

Peter Jansson

Harry Barker said:
Hi Group

I Have to complete a small project and i need you guys help in doing
it. I have to create a Tool that will automatically delete a file from
the Harddrive and also deleting a SubKey from the registry. Before
doing the same, the tool have to check the version of Windows.

There is no "registry" or "Windows" definied in C++.
Ex:

For Example if you guys could suggest me a coding where i can delete
the following.

Have to Delete SaveNow from ProgramFiles location in the harddrive

%ProgramFiles%\SaveNow\SaveNow.exe


std::remove((std::string(std::getenv("ProgramFiles")+"\\SaveNow\\SaveNow.exe
").c_str());
This of course assumes that there is a "ProgramFiles" key in the
environment.
Have to Delete SaveNow from the SubKey Uninstall
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\SaveN
ow

This, you should ask in a news group dedicated to Microsoft Windows.
If you guys can help me in this that will be great. If you have any
queries please to reply me. Thanks in Advance.

Harry Barker


Regards,

Peter Jansson
http://www.p-jansson.com/
http://www.jansson.net/
 
A

Alf P. Steinbach

* Harry Barker:
[OFF TOPIC]

Your posting is off-topic in this group.

Please read the FAQ before posting.

Please read the FAQ's listing of suitable groups for your posting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,150
Latest member
MakersCBDReviews
Top