Solved

modify Environment variable

Posted on 2012-03-15
6
221 Views
Last Modified: 2012-08-13
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
Comment
Question by:SPATNAIK
  • 2
  • 2
6 Comments
 
LVL 44

Expert Comment

by:Darr247
ID: 37726941
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
 

Author Comment

by:SPATNAIK
ID: 37727956
Hi,
Thanks for the response.
Actually I want to modify the Environment variable from my C++ program.

Thanks,
Srinivas
0
 
LVL 44

Accepted Solution

by:
Darr247 earned 500 total points
ID: 37727998
Oh...  the path is also stored in the registry at
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\Path
0
 

Author Comment

by:SPATNAIK
ID: 37728248
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 Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

cPanel is a Unix based web hosting control panel that provides a graphical interface and automation tools designed to simplify the process of hosting a web site. cPanel utilizes a 3 tier structure that provides functionality for administrators, rese…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now