View Full Version : Run Program Error
Amon Ra
05-29-2009, 09:16 AM
I am a newbie, I created a new autoplay project and made a button that will run a program (setup to be precise), but whenever I click on that button it says Error: 9999, and after I click OK it says "An unknown error occurred", the installation continues fine as if there were not any errors. So it does install it, but this error pops up, so what is the problem. :huh
mwreyf1
05-29-2009, 11:20 AM
Export your project to a .APZ file and upload it to the forum so that we can look at your code to better help you.
Amon Ra
05-30-2009, 12:39 PM
Ok, here is the project, error pops up with Run Program as quick action, no matter what i put in to run. Please somebody...
MicroByte
05-30-2009, 02:44 PM
!HELP! theres a werid looking spider in my pc!, lol
i dont think you can use code and a quick action together
trythis
Amon Ra
05-31-2009, 05:11 AM
Hehe, yeah, I over reacted, well, thanks for the tip, everything works fine now.:yes
Amon Ra
05-31-2009, 07:58 AM
Why I can not use Run program as a quick action? And the solution you provided only works with some .exe files, for example, my Setup.exe will not start with the script provided(yes, of course I changed the filename). Why do not you try with other .exe files.
mwreyf1
05-31-2009, 03:23 PM
No one said you couldn't use quick action to run an exe.
Someone did say that you may not be able to use a quick action to run the exe AND also run the action scripts (in your case...Page.Jump)
As for the code provided. There should be no reason why you can't run ANY exe using that code. Maybe you need to add args or whatever. Or maybe you need to change WaitForReturn to true.
MicroByte
05-31-2009, 06:04 PM
or set the correct working directory, anyhow, if File.Run is not working on some exe's then try Shell.Execute
Imagine Programming
05-31-2009, 09:14 PM
error 9999 (Unknown error), wasn't this the C stack overflow?
MicroByte
06-01-2009, 03:34 AM
in that case AMS would generate a "C Stack Overflow" error message which usually means there's a endless loop somewhere
its a unknown error because the OP confused the runtime error checking, its looking for errors in the quick command while also doing a page jump from the script, as you may know, lua is not multi threaded and can only perform 1 action at a time
also the Page.Jump action exists the running function or script, so if the File.Run is checking for a files existence and the Page.Jump exists the script then the runtime does not know what just happened and generates a unknown error
in any case, mixing quick commands and script actions is not a good idea and produces unpredictable results
Amon Ra
06-02-2009, 06:18 AM
Thanks microbyte, Shell.Execute did the thing. :yes
KintaRo
06-04-2009, 09:58 AM
I have a spider thanks :-S
Powered by vBulletin™ Version 4.0.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.