Process.Start(...) and Execution Environment,...

K

Kerem Gümrükcü

Hi,

i wonder that the Process.Start(...) needs full path to the
executable to start it, even the executable is listed in the
PATH Variable and can be launched from any console
on my system. Is it possible to do the same from Process.Start(...)?
How can i set the Process Executon Environment for the
Process, so that the call to Start(...) will resolve the path to the
Exe from the PATH Env. and run it. Is this possible...? Maybe
i miss something here,...


Regards

Kerem

--
 
P

parez

Hi,

i wonder that the Process.Start(...) needs full path to the
executable to start it, even the executable is listed in the
PATH Variable and can be launched from any console
on my system. Is it possible to do the same from Process.Start(...)?
How can i set the Process Executon Environment for the
Process, so that the call to Start(...) will resolve the path to the
Exe from the PATH Env. and run it. Is this possible...? Maybe
i miss something here,...

Regards

Kerem

--
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Microsoft Live Space:http://kerem-g.spaces.live.com/
Latest Open-Source Projects:http://entwicklung.junetz.de

You could use the following functions. Never tried it myself.

ProcessStartInfo p = new ProcessStartInfo();
Environment.GetEnvironmentVariables()
p.StartInfo.EnvironmentVariables.Add()
 
J

jp2msft

Just make sure the path your file is included in the Windows' path.

To set the Windows' path, go into My Computer > Properties.
 
K

Kerem Gümrükcü

Thanks to all repliers. It was a more detailed Problem
with Impersonation and Pinvoke. It has been solved.

Thanks to all replies,...


Regards

Kerem

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top