By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,949 Members | 1,063 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,949 IT Pros & Developers. It's quick & easy.

Deleting a File from Hardrive and Deleting a SubKey in Registry

P: n/a
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\Curr entVersion\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

Apr 19 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Harry Barker" <ha********@gmail.com> skrev i meddelandet
news:11**********************@i40g2000cwc.googlegr oups.com...
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\Curr entVersion\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/
Apr 19 '06 #2

P: n/a
* 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.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Apr 19 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.