Shell, Process.start cannot find file

  • Thread starter Thread starter Nikolas via .NET 247
  • Start date Start date
N

Nikolas via .NET 247

Hello All,

I am trying to start some processes from a VB.NET applicationwindow.
BUT; I dont want to hardwire the filenames by using the wholepathname of the .exe eg:
Shell(c:\windows\calc.exe"). The reason being that I want theapplication to be universal and not to rely on the user havingthe .EXEs installed in any specific folder even if this is arather simple "c:\programFiles" etc. Well, so far so good had Iwant to start windows applications such as notepad orcalculator. Can I use process.start (yes I know I have to useprocessInfo) with any .exe I like installed anywhere in the harddrive? And if not how do I star processes without hardwiringthem in my application?

Greatfull in advance.
 
* Nikolas via .NET 247 said:
I am trying to start some processes from a VB.NET application window.
BUT; I dont want to hardwire the filenames by using the whole pathname of the .exe eg:
Shell(c:\windows\calc.exe"). The reason being that I want the
application to be universal and not to rely on the user having the .EXEs
installed in any specific folder even if this is a rather simple
"c:\programFiles" etc. Well, so far so good had I want to start windows
applications such as notepad or calculator. Can I use process.start (yes
I know I have to use processInfo) with any .exe I like installed
anywhere in the hard drive? And if not how do I star processes without
hardwiring them in my application?

If the path containing the file is not mentioned in the 'PATH'
environment variable and/or some other locations, you will have to
search for the file:

<URL:http://dotnet.mvps.org/dotnet/samples/filesystem/downloads/FileSystemEnumerator.zip>
 
Back
Top