kaotkbliss 146 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. 010101000110100001101001011100110010000001101001011100110010000001101101011110010010000001110011011010010110011100100001My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueekWe're gonna need another Timmy! Share this post Link to post Share on other sites
erik7426 0 Posted September 24, 2010 Some things are picky about working directories. Have you tried specifying that in the run command? Run($exe,$path) Share this post Link to post Share on other sites
kaotkbliss 146 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. 010101000110100001101001011100110010000001101001011100110010000001101101011110010010000001110011011010010110011100100001My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueekWe're gonna need another Timmy! Share this post Link to post Share on other sites