473,406 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Deleting a File from Hardrive and Deleting a SubKey in Registry

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
2 1770
"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
* 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: perspicacious | last post by:
Please visit http://epaperpress.com/temp/t.html and click on the link. The link source indicates the filename is unix.tar.gz however, when downloading in ie6, it changes the name to ...
0
by: zerodot | last post by:
string keyName; string keyValue; keyName = "MyApp"; keyValue = "My App"; RegistryKey key,subkey; key = Registry.ClassesRoot.CreateSubKey(keyName); key.SetValue("",keyValue); subkey =...
2
by: James | last post by:
Help! I've made a cookie with a key called 'List' and subkey 'item3' and assigned it a value of "3" Response.Cookies("List")("item3")="3" How do I now delete the subkey "item3" without...
0
by: Cal | last post by:
When you delete a Registry subkey or a tree do you need to open it first. If not, how do you specify the branch? Thanks
8
by: Peter | last post by:
I'm trying to write a proceedure that will delete a file completely off a hardrive. I just don't want to kill the file. I want to rewrite over the data with 1's and 0's 8 times. Anyone have an...
3
by: Asawari | last post by:
Hi I'm trying to delete 1 registry key. It is giving me exception as System.ArgumentException: Cannot delete a subkey tree because the subkey does not exist. For deleting subkey, how to...
5
by: =?Utf-8?B?Qkw=?= | last post by:
Hello friends In c# 2005 I have written a function to access "font file name" by "Font name" and it is working fine in all the windows version other than vista, in vista it is throughing an...
6
by: =?Utf-8?B?ZGF2aWQ=?= | last post by:
The same error messages full out the application event log. --- "The open procedure for service "ASP.NET" in DLL "C:\WINNT\Microsoft.NET\Framework\v2.0.50727\aspnet_perf.dll" failed. Performance...
5
Sl1ver
by: Sl1ver | last post by:
I have this piece of code public bool Write(string KeyName, object Value) { try { // Setting string subKey1 =...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.