Deleting a File from Hardrive and Deleting a SubKey in Registry

Discussion in 'C++' started by Harry Barker, Apr 19, 2006.

  1. Harry Barker

    Harry Barker Guest

    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
     
    Harry Barker, Apr 19, 2006
    #1
    1. Advertising

  2. "Harry Barker" <> skrev i meddelandet
    news:...
    > 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/
     
    Peter Jansson, Apr 19, 2006
    #2
    1. Advertising

  3. * 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?
     
    Alf P. Steinbach, Apr 19, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. HK
    Replies:
    1
    Views:
    3,649
    Cowboy \(Gregory A. Beamer\)
    Apr 1, 2004
  2. Replies:
    0
    Views:
    757
  3. Leny
    Replies:
    3
    Views:
    16,934
    Daniel
    Feb 1, 2005
  4. MRW

    Subkey in CookieParameter

    MRW, Nov 2, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    383
  5. Richard Lamboj

    Python 2.5.x _winreg - rename a subkey

    Richard Lamboj, Apr 27, 2010, in forum: Python
    Replies:
    0
    Views:
    279
    Richard Lamboj
    Apr 27, 2010
Loading...

Share This Page