How Do I Start A Program With A Particular File

Hi,

I am trying to start a program C:FlashPla.exe and have it open a particular file when it appears.

How do I do this?

B-
LVL 3
bczingoAsked:
Who is Participating?
 
DotNetLover_BaanConnect With a Mentor Commented:
for example..   Process.Start("IExplore.exe", "C:\myPath\myFile.htm")
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemDiagnosticsProcessClassStartTopic.asp
0
 
DotNetLover_BaanCommented:
use...
Process.Start("File Address")
-Baan
0
 
Fahad MukhtarDistinguished EngineerCommented:
System.Diagnostics.Process.Start("Your_File_path")
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
Fahad MukhtarDistinguished EngineerCommented:
path of the particular file that you want to open with FlashPla.exe
0
 
imu79Commented:
something like this:

dim oStartInfo as New System.Diagnostics.ProcessStartInfo
with oStartInfo
   .FileName = "C:\FlashPlay.exe"
   .Arguments = "C:\myFlash.swf"
   .WindowStyle = ProcessWindowStyle.Normal
end with

System.Diagnostics.Process.Start(oStartInfo)

Look at the ProcessStartInfo class for more options to customize the way you start the new process. Both the Process and the ProcessStartInfo classes are in the System.Diagnostics namespace.

hope this helps..
Imran.
0
 
RonaldBiemansCommented:
or

Shell("c:\FlashPla.exe " & yourfile, AppWinStyle.MaximizedFocus)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.