goodbyeplanet Posted January 24, 2011 Posted January 24, 2011 the run command executes the exe file which install the program on the computer. How do i timeout suppose the installation for some reason hangs.... thank you for your help...
UEZ Posted January 24, 2011 Posted January 24, 2011 You can check the PID whether it still exists after x seconds/minutes/hours. The Run command returns the PID. Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
goodbyeplanet Posted January 24, 2011 Author Posted January 24, 2011 You can check the PID whether it still exists after x seconds/minutes/hours. Not really..I have noticed that the PID will ALWAYS remain even if the exe hangs. I tried it soemtime last week...
UEZ Posted January 24, 2011 Posted January 24, 2011 What do you want to do when the app. hangs? Close the hanging app? Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
goodbyeplanet Posted January 24, 2011 Author Posted January 24, 2011 yes i would like to close the hanging app...
goodbyeplanet Posted January 24, 2011 Author Posted January 24, 2011 $pid = run (myapp.exe) $time = @sec if $time > 20 then processclose($pid) endif above is something that might be close but determining how long each app installs is a bit complicated since i have soo many applications..
UEZ Posted January 24, 2011 Posted January 24, 2011 (edited) Here an simple example which starts Calc.exe and closes it after 10 seconds. $pid = Run("calc.exe", "", @SW_HIDE) $timer = TimerInit() $wait = 1000 * 10 ;10 seconds While TimerDiff($timer) < $wait Sleep(50) WEnd ProcessClose($pid) Exit You can use an array for saving the pids and its timeout values. Each second you can check whether pid still exits and if it is running more than timeout value close the app. Br, UEZ Edited January 24, 2011 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
somdcomputerguy Posted January 24, 2011 Posted January 24, 2011 How do i timeout suppose the installation for some reason hangs....So what condition is true after a successful install? Check for that after an amount of time has passed since the start. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
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