?
Solved

modify Environment variable

Posted on 2012-03-15
6
Medium Priority
?
228 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 2000 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Migration of Exchange mailbox can be done with the ExProfre.exe tool. But at times, when the ExProfre.exe tool migrates the Exchange Server user profile, it results in numerous synchronization problems. Synchronization error messages appear in the e…
Ok I have been working on this for some time having learned and gained certification in XenDesktop 4 along came version 5 which was released last month. Since then I have been working to deploy XenDesktop 5 in a small environment with only 2 virt…
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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses
Course of the Month12 days, 14 hours left to enroll

777 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