• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 230
  • Last Modified:

modify Environment variable

HI,

I want to modify the "Path" environment variable in system using C++.
I have a reference of Oracle in the "path" variable which I want to remove as I am uninstalling oracle.
Thanks for the help.

Srinivas
0
SPATNAIK
Asked:
SPATNAIK
  • 2
  • 2
1 Solution
 
Darr247Commented:
Environment Variables are in sysdm.cpl on the Advanced tab.

Start->Run, sysdm.cpl [Enter]

In the bottom section, click on Path, then the Edit button.

You can view current environment variables by opening a command window and running
SET
by itself.
0
 
SPATNAIKAuthor Commented:
Hi,
Thanks for the response.
Actually I want to modify the Environment variable from my C++ program.

Thanks,
Srinivas
0
 
Darr247Commented:
Oh...  the path is also stored in the registry at
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\Path
0
 
SPATNAIKAuthor Commented:
If there is any Windows API to do this it would have been nice.
Anyways Thanks for the response. I will update the registry programatically and check the results.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now