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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top