Solved

modify Environment variable

Posted on 2012-03-15
6
226 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are 2 things you must have in order to connect to the internet behind a router, The "Gateway IP" of the router, which is usually something like 192.168.xxx.1, I've seen routers with default values of: 192.168.0.1, 192.168.1.1, 192.168.11.1, …
Sometimes people don't understand why download speed shows differently for Windows than Linux.Specially, this article covers and shows the solution for throughput difference for Windows than a Linux machine. For this, I arranged a test scenario.I…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Suggested Courses

739 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