thunkele Posted April 19, 2007 Share Posted April 19, 2007 I am trying to use the Run() function to run the following file: c:\somedir\somefile.apr I have tried Run("somefile.apr", "c:\somedir\) ERROR: Cannot find file as well as Run("c:\somedir\somefile.apr") ERROR: Unable to execute the external Program Is it even possible to execute something other than an exe, bat, or such file. I don't want any values returned, I want this to execute at the end of my code. Any help would be appreciated. Thanks! Link to comment Share on other sites More sharing options...
soulhealer Posted April 19, 2007 Share Posted April 19, 2007 (edited) I am trying to use the Run() function to run the following file:c:\somedir\somefile.aprI have triedRun("somefile.apr", "c:\somedir\)ERROR: Cannot find fileas well asRun("c:\somedir\somefile.apr")ERROR: Unable to execute the external ProgramIs it even possible to execute something other than an exe, bat, or such file. I don't want any values returned, I want this to execute at the end of my code. Any help would be appreciated. Thanks!everytime u want to execute something, u need an executor, in this case, the application that runs .apr files.like if u want to open(execute) a .txt file, u need notepad. so all u do is Run("notepad mytextfile.txt") and it will work.why? because you have notepad.exe in your windows system folder. and windows system folder is listed on your systemdefault path. if it's not, you will have to do Run("c:\windows\notepad.exe mytextfile.txt") Edited April 19, 2007 by soulhealer Link to comment Share on other sites More sharing options...
Sokko Posted April 19, 2007 Share Posted April 19, 2007 Better yet, use ShellExecute to automatically open the file with whatever application it's associated with.ShellExecute("C:\somedir\somefile.apr") Link to comment Share on other sites More sharing options...
thunkele Posted April 19, 2007 Author Share Posted April 19, 2007 Thanks guys! 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