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. Absolute path of %systemroot% and %userprofile%

Absolute path of %systemroot% and %userprofile%

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
7 Posts 4 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.
  • S Offline
    S Offline
    Sonani Prakash
    wrote on last edited by
    #1

    Hi, how to get absolute path of %systemroot% or %userprofile%. I want to create file into %userprofile% path and CFile does not accept that sort of path so I need somehow absolute path of %UserProfile%. as it is changing depending on user's account on PC. Can anyboday let me know about this ? Thanks, Prakash

    sonani prakash

    N 1 Reply Last reply
    0
    • S Sonani Prakash

      Hi, how to get absolute path of %systemroot% or %userprofile%. I want to create file into %userprofile% path and CFile does not accept that sort of path so I need somehow absolute path of %UserProfile%. as it is changing depending on user's account on PC. Can anyboday let me know about this ? Thanks, Prakash

      sonani prakash

      N Offline
      N Offline
      Naveen
      wrote on last edited by
      #2

      use GetEnvironmentVariable() function. or ExpandEnvironmentStrings()

      nave

      S 1 Reply Last reply
      0
      • N Naveen

        use GetEnvironmentVariable() function. or ExpandEnvironmentStrings()

        nave

        S Offline
        S Offline
        Sonani Prakash
        wrote on last edited by
        #3

        yes i got it. thanks for your effort, Prakash

        sonani prakash

        P 1 Reply Last reply
        0
        • S Sonani Prakash

          yes i got it. thanks for your effort, Prakash

          sonani prakash

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

          Sonani Prakash wrote:

          thanks for your effort

          You can say thanks to him by voting him. Votes are meant for thanking these volunteers.

          Prasad Notifier using ATL | Operator new[],delete[][^]

          H 1 Reply Last reply
          0
          • P prasad_som

            Sonani Prakash wrote:

            thanks for your effort

            You can say thanks to him by voting him. Votes are meant for thanking these volunteers.

            Prasad Notifier using ATL | Operator new[],delete[][^]

            H Offline
            H Offline
            Hamid Taebi
            wrote on last edited by
            #5

            prasad_som wrote:

            Votes are meant for thanking

            But which 1 or 5 ;)


            WhiteSky


            P 1 Reply Last reply
            0
            • H Hamid Taebi

              prasad_som wrote:

              Votes are meant for thanking

              But which 1 or 5 ;)


              WhiteSky


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

              WhiteSky wrote:

              But which 1 or 5

              Hmmm, 5 will do, like I'm giving you now.

              Prasad Notifier using ATL | Operator new[],delete[][^]

              H 1 Reply Last reply
              0
              • P prasad_som

                WhiteSky wrote:

                But which 1 or 5

                Hmmm, 5 will do, like I'm giving you now.

                Prasad Notifier using ATL | Operator new[],delete[][^]

                H Offline
                H Offline
                Hamid Taebi
                wrote on last edited by
                #7

                :laugh:;) Thank you


                WhiteSky


                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