Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Deleting a File from Hardrive and Deleting a SubKey in Registry

Reply
Thread Tools

Deleting a File from Hardrive and Deleting a SubKey in Registry

 
 
Harry Barker
Guest
Posts: n/a
 
      04-19-2006
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

 
Reply With Quote
 
 
 
 
Peter Jansson
Guest
Posts: n/a
 
      04-19-2006
"Harry Barker" <(E-Mail Removed)> skrev i meddelandet
news:(E-Mail Removed) 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/


 
Reply With Quote
 
 
 
 
Alf P. Steinbach
Guest
Posts: n/a
 
      04-19-2006
* 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?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting data from the file without deleting the file first crea C++ 2 12-28-2012 11:50 PM
Python 2.5.x _winreg - rename a subkey Richard Lamboj Python 0 04-27-2010 11:23 AM
Subkey in CookieParameter MRW ASP .Net 0 11-02-2006 10:12 PM
bad sectors and new hardrive albert smith Computer Support 3 10-09-2004 03:21 AM
Hardrive s Computer Support 11 07-15-2003 01:01 PM



Advertisments