Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. RegSetValueEx in Vista

RegSetValueEx in Vista

Scheduled Pinned Locked Moved C / C++ / MFC
windows-adminjson
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    Yashusid
    wrote on last edited by
    #1

    Hi, I am setting value name and value data to a registry key in HKLM. This function succedes and correctly sets the data correctly for this key in Windows 2000, windows 2003, Windows XP, but in Vista function succedes but if i open the registry and see it is not setting any values. What i need to change to work with Vista also. lRetCode=RegSetValueEx(hDckey,sourceName,0, REG_SZ, (LPBYTE)RegFile, (DWORD) (_tcslen(RegFile)+1)*sizeof(TCHAR)); and also the API RegDeleteValue(hDckey,Source); is not deleting the value for this key eventhough this data is there for this key only in Vista it works with other platforms of Windows

    P 1 Reply Last reply
    0
    • Y Yashusid

      Hi, I am setting value name and value data to a registry key in HKLM. This function succedes and correctly sets the data correctly for this key in Windows 2000, windows 2003, Windows XP, but in Vista function succedes but if i open the registry and see it is not setting any values. What i need to change to work with Vista also. lRetCode=RegSetValueEx(hDckey,sourceName,0, REG_SZ, (LPBYTE)RegFile, (DWORD) (_tcslen(RegFile)+1)*sizeof(TCHAR)); and also the API RegDeleteValue(hDckey,Source); is not deleting the value for this key eventhough this data is there for this key only in Vista it works with other platforms of Windows

      P Offline
      P Offline
      prasad_som
      wrote on last edited by
      #2

      Have a look at UAC[^] on vista. There restriction in playing with registry from all previous platform.


      Prasad MS MVP -  VC++

      Y 1 Reply Last reply
      0
      • P prasad_som

        Have a look at UAC[^] on vista. There restriction in playing with registry from all previous platform.


        Prasad MS MVP -  VC++

        Y Offline
        Y Offline
        Yashusid
        wrote on last edited by
        #3

        Thanks a lot!!! I changed the "Privelege level" to "run this program as administrator",It sets the registry key values. but i had some cout and cerr statements, those are not getting displayed on the console.do i need to do some settings for this also ? please let me know... and also please tell me how to change this privilege level programmatically. Any help will be appreciated!!!!!

        P 1 Reply Last reply
        0
        • Y Yashusid

          Thanks a lot!!! I changed the "Privelege level" to "run this program as administrator",It sets the registry key values. but i had some cout and cerr statements, those are not getting displayed on the console.do i need to do some settings for this also ? please let me know... and also please tell me how to change this privilege level programmatically. Any help will be appreciated!!!!!

          P Offline
          P Offline
          prasad_som
          wrote on last edited by
          #4

          Yashusid wrote:

          do i need to do some settings for this also ?

          Yes. You can try posting your questions in Vista[^] forum. You will get useful answers there.


          Prasad MS MVP -  VC++

          Y 1 Reply Last reply
          0
          • P prasad_som

            Yashusid wrote:

            do i need to do some settings for this also ?

            Yes. You can try posting your questions in Vista[^] forum. You will get useful answers there.


            Prasad MS MVP -  VC++

            Y Offline
            Y Offline
            Yashusid
            wrote on last edited by
            #5

            Thank u ....i have posted this in Vista board.....

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups