Thread: would like to change the value in the registry

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    13

    Angry would like to change the value in the registry

    Hello, I would like to know if any of you can tell me how I can edit a file in the registry using C/C++? I can go on my PC and run regedit and rename the file my self. But I am looking to make this step automated! I want to run my program and rename a file I have in the registry. The path I'm trying to reach is:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr

    entVersion\Policies\Ratings

    I'm looking to rename this file to:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr

    entVersion\Policies\Ratings1

    Thanks for any help...

    PS I looked up some of the reg functions. but becuase I don't know what I'm doing I don't want to run any of them till I hear from you.

    Thanks for your help
    Thanks,
    Cyberpuck52

    "If you know the enemy and know yourself, you need not fear the result of a hundred battles"
    -Sun Tzu, Art of War

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    Crossposting isn't nice..... I put a response on the C++ baord

  3. #3
    Registered User
    Join Date
    Jan 2002
    Posts
    13
    Sorry I didn't realize everyone read every post. I will keep it to one post from now on. I'm just getting the hang of this board. I just registered today and I have already been yelled at twice. I have replied to you on the C++ board.

    PS would this have been an C++ issue or an windows issue? I don't know. Would like to know so I don't make the same mistakes. Thanks


    "Those that make mistakes are trying...Those that don't make the same mistakes are learning"
    Thanks,
    Cyberpuck52

    "If you know the enemy and know yourself, you need not fear the result of a hundred battles"
    -Sun Tzu, Art of War

  4. #4
    Registered User
    Join Date
    Jan 2002
    Posts
    75

    Windows issue

    Yeah, this is a windows issue because you have to use windows function calls.

    Anyways, I can't give you a full low-down on this stuff because I'm not that good; but, I do have a link to the msdn website where the reg functions are.

    You should be able to simply call the delete registry key function on 'Rating' and then Create registry key on 'Rating1'.

    Registry Functions

  5. #5
    Registered User
    Join Date
    Jan 2002
    Posts
    13
    Thanks a lot for the help! I will look into that site! Thanks for clearing up the post question too.


    Thanks,
    Dan
    Thanks,
    Cyberpuck52

    "If you know the enemy and know yourself, you need not fear the result of a hundred battles"
    -Sun Tzu, Art of War

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to change static char* and not lose mem ?
    By jabka in forum C Programming
    Replies: 15
    Last Post: 09-07-2007, 05:33 PM
  2. Change Value in an array
    By beginner999 in forum C Programming
    Replies: 3
    Last Post: 01-18-2003, 07:16 AM
  3. how to change menu show delay in registry
    By Shadow12345 in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 01-08-2003, 08:07 PM
  4. Replies: 2
    Last Post: 11-08-2002, 03:22 AM
  5. Replies: 2
    Last Post: 09-04-2001, 02:12 PM