kaotkbliss Posted September 24, 2010 Share Posted September 24, 2010 Where to start? First, the program is in my sig and everything works fine. Except some programs/games seem to have a problem running properly with the Run() or ShellExecute() commands. The program reads a shortcut in a text file in the format of "label=program path.exe" it takes the program path.exe and assigns it to a variable, then Run($var). Most programs run fine this way, but occassionally some programs start to run then the window pops up saying the program has errored and needs to close. (not an autoit window) If I run the exe directly from the location, it works fine. If I create a shortcut on the desktop, it runs fine. If I add a shortcut to ListView in autoit and use the Run command the program errors and closes... Is there a better way than Run or ShellExecute (I've used both with the same result) or perhaps an option or flag with either of those commands that would make it work? It does not do it with most programs, just some of them. 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
erik7426 Posted September 24, 2010 Share Posted September 24, 2010 Some things are picky about working directories. Have you tried specifying that in the run command? Run($exe,$path) Link to comment Share on other sites More sharing options...
kaotkbliss Posted September 24, 2010 Author Share Posted September 24, 2010 Thanks, it worked. I had thought about the working dir for the program but since the only refrence was the full path saved in a txt and the fact that I suck with stringregexp still, I wasn't sure how to go about it since each program in the listview could be any number of sub directories into a drive. Then I found _Pathsplit and was able to piece together the first 2 results of the array for a working dir. 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! 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