Opening a File in VB.Net

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to Open an exe file.

Dim p As String
p = "C:\Program Files\hello.exe"


File.Open(p, FileMode.Append)
Me.Visible = False


But nothing is happening. Any help or Knowledge about this would be
aprreciated
 
Mario said:
I am trying to Open an exe file.

Dim p As String
p = "C:\Program Files\hello.exe"


File.Open(p, FileMode.Append)
Me.Visible = False


But nothing is happening. Any help or Knowledge about this would be
aprreciated

What did you expect to happen as a result of this code? You have opened a
file for output in a mode that will append new data (when written) to
existing data already in the file. Are you trying to write additional binary
data to the file?

If you are trying to write to a file, look here:

http://msdn.microsoft.com/library/d...hoosingamongfileiooptionsinvisualbasicnet.asp

OTOH, if you are trying to execute the file:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vafctshell.asp
 
Back
Top