Radsam Posted December 1, 2004 Share Posted December 1, 2004 I need to run an associated file. For example, Run("C:\somefile.mex") How can I do this? Link to comment Share on other sites More sharing options...
SlimShady Posted December 1, 2004 Share Posted December 1, 2004 Can you please use the search function first? Thank you. Link to comment Share on other sites More sharing options...
erebus Posted December 1, 2004 Share Posted December 1, 2004 (edited) 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 December 1, 2004 by erebus Link to comment Share on other sites More sharing options...
SlimShady Posted December 1, 2004 Share Posted December 1, 2004 1. This question has been asked 20 times before.2. It's in the FAQ since forever Link to comment Share on other sites More sharing options...
Wolvereness Posted December 2, 2004 Share Posted December 2, 2004 (edited) 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 December 2, 2004 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 More sharing options...
Guest shaun Posted December 2, 2004 Share Posted December 2, 2004 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") Link to comment Share on other sites More sharing options...
Chris_1013 Posted December 2, 2004 Share Posted December 2, 2004 Also, try searching the forums for ShellExecute, someone has found a way to do this using DLLCall. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now