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