oracle - I want to apply a modification to the path environement system variable without rebooting or restarting the cmd owing to c# -


i using c# dll using installshield add path of oracle path environement system variable able connect oracle database owing instant client.

whan run installer first time doesn't succeed make change path variable. succeed on second try because path changed first run. conclusion oracle database provider not view change directly after modifying code.

i want way detect changes path variable without need try installation second time.

var ancientpath = environment.getenvironmentvariable("path", environmentvariabletarget.machine);   environment.setenvironmentvariable("path", ancientpath + ";" + tmp, environmentvariabletarget.machine); 

what you're trying explicitly not do-able. process can modify it's own environment, , can spawn processes different environments, no process can change environment of process. when launch new process after first installation, should see updated path.

if want existing process use new environment variables, must restarted. if installer failing because it's missing path information, you're going have work around that.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -