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. Environment Variable

Environment Variable

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestionworkspace
8 Posts 6 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.
  • A Offline
    A Offline
    Anil_vvs
    wrote on last edited by
    #1

    Hi All, Can anyone tell me how to change the value of an Environment variable programmatically? I have tried _putenv, _wputenv and SetEnvironmentVariable. All of them are returning success but the value is not changing. Can anyone tell me where I am going wrong? Thanks and Regards, Anil

    T M 2 Replies Last reply
    0
    • A Anil_vvs

      Hi All, Can anyone tell me how to change the value of an Environment variable programmatically? I have tried _putenv, _wputenv and SetEnvironmentVariable. All of them are returning success but the value is not changing. Can anyone tell me where I am going wrong? Thanks and Regards, Anil

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #2

      the environment variable are acutally changed, but within the process... close the windows session to see the changes appear...


      TOXCCT >>> GEII power
      [toxcct][VisualCalc 2.24][3.0 soon...]

      1 Reply Last reply
      0
      • A Anil_vvs

        Hi All, Can anyone tell me how to change the value of an Environment variable programmatically? I have tried _putenv, _wputenv and SetEnvironmentVariable. All of them are returning success but the value is not changing. Can anyone tell me where I am going wrong? Thanks and Regards, Anil

        M Offline
        M Offline
        mbue
        wrote on last edited by
        #3

        The environment block for each process is a copy of the system environment. You can modify it for your own process. But you cannot change the environment for other applications.

        T 1 Reply Last reply
        0
        • M mbue

          The environment block for each process is a copy of the system environment. You can modify it for your own process. But you cannot change the environment for other applications.

          T Offline
          T Offline
          toxcct
          wrote on last edited by
          #4

          will you repeat what i say for long ??? X|


          TOXCCT >>> GEII power
          [toxcct][VisualCalc 2.24][3.0 soon...]

          C 1 Reply Last reply
          0
          • T toxcct

            will you repeat what i say for long ??? X|


            TOXCCT >>> GEII power
            [toxcct][VisualCalc 2.24][3.0 soon...]

            C Offline
            C Offline
            Cedric Moonen
            wrote on last edited by
            #5

            :laugh: Maybe you should copyright your answers

            T 1 Reply Last reply
            0
            • C Cedric Moonen

              :laugh: Maybe you should copyright your answers

              T Offline
              T Offline
              toxcct
              wrote on last edited by
              #6

              that's not what i meant, but the guy has been answering twice on something i already answered... was there a real need to spam the forum with answers that don't solve the problem more ?


              TOXCCT >>> GEII power
              [toxcct][VisualCalc 2.24][3.0 soon...]

              A D 2 Replies Last reply
              0
              • T toxcct

                that's not what i meant, but the guy has been answering twice on something i already answered... was there a real need to spam the forum with answers that don't solve the problem more ?


                TOXCCT >>> GEII power
                [toxcct][VisualCalc 2.24][3.0 soon...]

                A Offline
                A Offline
                Abebe
                wrote on last edited by
                #7

                i have to admit that his answer was more clear, so i think it does not qualify as spam. Er zit een korstje op mijn aars.

                1 Reply Last reply
                0
                • T toxcct

                  that's not what i meant, but the guy has been answering twice on something i already answered... was there a real need to spam the forum with answers that don't solve the problem more ?


                  TOXCCT >>> GEII power
                  [toxcct][VisualCalc 2.24][3.0 soon...]

                  D Offline
                  D Offline
                  David Crow
                  wrote on last edited by
                  #8

                  toxcct wrote:

                  ...the guy has been answering twice on something i already answered...

                  Is that necessarily a bad thing? Are you sure that he saw your post before making one of his own?


                  "Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain

                  "There is no death, only a change of worlds." - Native American Proverb

                  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