Click here to Skip to main content
15,889,096 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I can open a software if I know the exe name of software
C#
Process word = new Process();
word.StartInfo.FileName = "winword.exe";
word.Start();


the above code will open Microsoft word but here I need the name of exe (winword for above code) but can I do that user enter name of software like photoshop or any name and that software has to be open here I have to find name of exe programatically can anyone help me to do this?
Posted
Comments
PIEBALDconsult 8-Aug-15 17:07pm    
Then why would the user need your application? The GUI provides that already.
Sergey Alexandrovich Kryukov 8-Aug-15 21:03pm    
Good point. This is one of the most typical kinds of abuse. (But I answered the question.)
—SA
Sergey Alexandrovich Kryukov 8-Aug-15 21:03pm    
What's wrong with just reading original MSDN documentation?
—SA

1 solution

 
Share this answer
 
Comments
Member 11713217 10-Aug-15 2:23am    
of course I know that GUI provides facility
but I am working on one project in which this type of requirement is needed

As per MSDN also

Process myProcess = new Process();
// Get the process start information of notepad.
ProcessStartInfo myProcessStartInfo = new ProcessStartInfo("notepad.exe");
;

it also needed .exe name
I am looking for user only enter software's name and by clicking on button software must be open
Sergey Alexandrovich Kryukov 10-Aug-15 2:28am    
I answered in full. What part of my answer is not clear?
—SA
CPallini 10-Aug-15 2:41am    
5.
Sergey Alexandrovich Kryukov 10-Aug-15 2:47am    
Thank you, Carlo.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900