Jump to content

Run a non .exe file


Radsam
 Share

Recommended Posts

I need to run an associated file.

For example,

Run("C:\somefile.mex")

How can I do this?

The "Run" function supports only stand-alone executables (EXE, BAT, COM, PIF) - check the helpfile for more on this.

If you want to execute an assosiated file, you must also call its program in the same line. I.e.:

Run("notepad.exe myfile.txt")

Check the helpfile and you 'll understand..

Edited by erebus
Link to comment
Share on other sites

Just an addition, it very IS possible to run a none-executable.

The catch is that you need the program _that it opens with_. In this style:

Run('"$programtopenwith" "$fullpathoffile"')

and example of this is for an .html file you need

Run('"iexplorer" "file.html"')

SOME PROGRAMS NEED ADDITIONAL PARAMETERS->check the registery for specifics on none-windows programs.

Edited by Wolvereness

Offering any help to anyone (to my capabilities of course)Want to say thanks? Click here! [quote name='Albert Einstein']Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.[/quote][quote name='Wolvereness' date='7:35PM Central, Jan 11, 2005']I'm NEVER wrong, I call it something else[/quote]

Link to comment
Share on other sites

I need to run an associated file.

For example,

Run("C:\somefile.mex")

How can I do this?

<{POST_SNAPBACK}>

Let Windows decide which .exe to run by using the Windows START command...

Run(@COMSPEC & " /C START C:\somefile.mex")

:idiot:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...