Click here to Skip to main content
15,923,909 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# Excel Sheet Reading Problems Pin
Heath Stewart23-Mar-04 4:04
protectorHeath Stewart23-Mar-04 4:04 
GeneralGetting the exe path Pin
SatyaDY22-Mar-04 20:08
SatyaDY22-Mar-04 20:08 
GeneralRe: Getting the exe path Pin
partyganger22-Mar-04 20:24
partyganger22-Mar-04 20:24 
GeneralRe: Getting the exe path Pin
SatyaDY22-Mar-04 21:03
SatyaDY22-Mar-04 21:03 
GeneralRe: Getting the exe path Pin
hazzem elrefai22-Mar-04 21:09
hazzem elrefai22-Mar-04 21:09 
GeneralRe: Getting the exe path Pin
SatyaDY22-Mar-04 21:41
SatyaDY22-Mar-04 21:41 
GeneralRe: Getting the exe path Pin
Dave Kreskowiak23-Mar-04 1:58
mveDave Kreskowiak23-Mar-04 1:58 
GeneralRe: Getting the exe path Pin
Heath Stewart23-Mar-04 4:15
protectorHeath Stewart23-Mar-04 4:15 
When executables are in directories listed in the PATH environment variable, they can be executed without specify a directory. If they aren't in the path (including the current working directory), then you need to know where they are up-front like Dave said.

If the executable is in the PATH and you still want the full path, use Environment.GetEnvironmentVariable for "PATH", then use String.Split to split the paths into a string[] array using ";" as the delimiter. You can then search those paths in order to find all the paths to the executables.

If they aren't in the PATH, then you should either store the paths in the registry or some common file during installation, or creating an RCW (Runtime Callable Wrapper) around the MSI runtime (if you used Windows Installer for your installation of these programs) and query for the executable's component path.

There's no automagical way to get this information.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Getting the exe path Pin
Sascha Andres25-Mar-04 11:02
Sascha Andres25-Mar-04 11:02 
GeneralUser control automatically resized when the parent form is sized in C# Pin
jayakarthikeyan22-Mar-04 18:42
jayakarthikeyan22-Mar-04 18:42 
GeneralRe: User control automatically resized when the parent form is sized in C# Pin
Dave Kreskowiak23-Mar-04 1:59
mveDave Kreskowiak23-Mar-04 1:59 
GeneralRe: User control automatically resized when the parent form is sized in C# Pin
jayakarthikeyan23-Mar-04 3:31
jayakarthikeyan23-Mar-04 3:31 
GeneralRe: User control automatically resized when the parent form is sized in C# Pin
Dave Kreskowiak23-Mar-04 3:55
mveDave Kreskowiak23-Mar-04 3:55 
GeneralRe: User control automatically resized when the parent form is sized in C# Pin
jayakarthikeyan26-Mar-04 2:45
jayakarthikeyan26-Mar-04 2:45 
GeneralRe: User control automatically resized when the parent form is sized in C# Pin
Heath Stewart23-Mar-04 4:17
protectorHeath Stewart23-Mar-04 4:17 
GeneralChoosing The Right Design Pattern Pin
sixefftee22-Mar-04 18:14
sixefftee22-Mar-04 18:14 
Questionaccess to Win32Native class? Pin
Ray Gregory22-Mar-04 15:48
Ray Gregory22-Mar-04 15:48 
AnswerRe: access to Win32Native class? Pin
Nick Parker22-Mar-04 17:17
protectorNick Parker22-Mar-04 17:17 
GeneralDecryption Problem Pin
terry_cyf22-Mar-04 15:15
terry_cyf22-Mar-04 15:15 
GeneralRe: Decryption Problem Pin
Mazdak22-Mar-04 23:53
Mazdak22-Mar-04 23:53 
GeneralRe: Decryption Problem Pin
terry_cyf23-Mar-04 20:42
terry_cyf23-Mar-04 20:42 
Generalbarcode Pin
tonaxxl22-Mar-04 13:56
tonaxxl22-Mar-04 13:56 
GeneralRe: barcode Pin
John Kuhn22-Mar-04 14:04
John Kuhn22-Mar-04 14:04 
GeneralMultiple message filters Pin
bisquic22-Mar-04 11:44
bisquic22-Mar-04 11:44 
GeneralRe: Multiple message filters Pin
Nick Parker22-Mar-04 16:02
protectorNick Parker22-Mar-04 16:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.