Computing.Net > Forums > Programming > How to OPen a File in VB.NET

How to OPen a File in VB.NET

Reply to Message Icon

Original Message
Name: besttech01
Date: July 18, 2005 at 21:29:32 Pacific
Subject: How to OPen a File in VB.NET
OS: WinXP/ Fedora
CPU/Ram: 2.4/512
Comment:

Hello,
I would like to know what do I enter in VB.NET script so when I click button1 it opens up the file "C:\test.exe".


Report Offensive Message For Removal


Response Number 1
Name: Chi Happens
Date: July 19, 2005 at 02:30:14 Pacific
Reply: (edit)

Dim Proc As New System.Diagnostics.Process
Proc.StartInfo.WorkingDirectory = "C:\"
Proc.StartInfo.FileName = "test.exe"
Proc.Start()


Chi


They mostly come at night...mostly.


Report Offensive Follow Up For Removal

Response Number 2
Name: besttech01
Date: July 23, 2005 at 16:19:48 Pacific
Reply: (edit)

When I paste this code in VB and exec the program, test.exe opens up but all I see is a blank cmd window titled "C:\test.exe". I know it is working because Esc 2 times and Y (for yes) quits the program like it should. So it is working, but with a blank output window. Any ideas?


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: How to OPen a File in VB.NET

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 5 Days.
Discuss in The Lounge