473,657 Members | 2,805 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_MACH INE\SOFTWARE\Mi crosoft\Windows \CurrentVersion \Uninstall\Save Now

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 1790
"Harry Barker" <ha********@gma il.com> skrev i meddelandet
news:11******** **************@ i40g2000cwc.goo glegroups.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((st d::string(std:: getenv("Program Files")+"\\Save Now\\SaveNow.ex e
").c_str()) ;
This of course assumes that there is a "ProgramFil es" key in the
environment.

Have to Delete SaveNow from the SubKey Uninstall

HKEY_LOCAL_MACH INE\SOFTWARE\Mi crosoft\Windows \CurrentVersion \Uninstall\Save N
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
4849
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 unix.tar.tar What's going on?
0
1085
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 = key.CreateSubKey("shell");
2
2641
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 deleting any other subkeys that might be in 'List'???
0
1556
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
2713
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 idea or sample source? -Peter
3
3255
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 provide the key name? For e.g.
5
3675
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 error so please help me how can i access font file name by font name in windows vista or what change i have to do in following function to get the solution my function source code is givin below -
6
5154
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 data for this service will not be available. Status code returned is data DWORD 0. Data (words): 0000: 80004005 ---
5
5078
Sl1ver
by: Sl1ver | last post by:
I have this piece of code public bool Write(string KeyName, object Value) { try { // Setting string subKey1 = "SOFTWARE\\QwixAssets"; RegistryKey rk = Registry.LocalMachine; RegistryKey sk1 = rk.CreateSubKey(subKey1);
0
8403
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8316
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8833
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8737
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8509
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6174
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4327
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1730
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.