Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

isiahil

Using VB to open .exe's

This topic is 5282 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
Guest Anonymous Poster
If you mean to just run an executable then you can use

Shell(Command As String)

for example

Shell("C:\WINDOWS\notepad.exe"

to open notepad

Share this post


Link to post
Share on other sites
There is a matching API call that can make Shell() more powerful (ie. with the call if you shell("path\exampleworddocument.doc") it will open in word. By default the shell function only works on executables AFAIK).

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
ShellExecute(...)?

Share this post


Link to post
Share on other sites
quote:

No, it works with any registered file type.



Not without the accompanying Win32 API call.


Private Sub CmdShellTxt_Click()
shell("C:\testtextfile.txt") 'produces 'invalid proceedure call or argument' error
End Sub

Private Sub CmdShellExe_Click()
shell("C:\testexefile.exe") 'Runs textexefile.exe
End Sub


Try it. More info on the function here.

//EDIT: added MSDN link



[edited by - kazgoroth on June 2, 2004 3:08:27 AM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by MaulingMonkey
If you mean how can you modify an .exe using visual basic, the answer is you can''t.


How the hell did you come to that conclusion? I''m really, truly, baffled. Seriously.

It''s _entirely_ possible to modify _any_ file using VB 6.0 Anyone who knows the language is aware of this. Perhaps, in the future, you should avoid making comments about subjects you know nothing about.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!