Jump to content
Sign in to follow this  
thunkele

Running non Executables

Recommended Posts

thunkele

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!

Share this post


Link to post
Share on other sites
soulhealer

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!

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 system

default path. if it's not, you will have to do Run("c:\windows\notepad.exe mytextfile.txt")

Edited by soulhealer

Share this post


Link to post
Share on other sites
Sokko

Better yet, use ShellExecute to automatically open the file with whatever application it's associated with.

ShellExecute("C:\somedir\somefile.apr")

Share this post


Link to post
Share on other sites
thunkele

Thanks guys!

Share this post


Link to post
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
Sign in to follow this  

×