WINAMP.COM | Forums : Powered by vBulletin version 2.3.9 WINAMP.COM | Forums > Developer Center > NSIS Discussion > ExecTimeout Plugin
  Last Thread   Next Thread
Author
Thread Post New Thread    Post A Reply
LoRd_MuldeR
Senior Member

Registered: Sep 2005
From: Germany

ExecTimeout Plugin

I just created an "ExecTimeout" plugin. It will execute and application and wait for the process to exit, just like ExecWait. But in contrast to ExecWait you can specify a timeout. If the application does not exit before the timeout exceeds, it will be terminated. This can be used to make sure your installer won't stall, even if the application doesn't exit for some reason. Plugin, sources and example attached.

Attachment: exectimeout.2008-06-27.zip
This has been downloaded 130 time(s).

Quick Link | Report this post to a moderator | IP: Logged

LoRd_MuldeR is offline Old Post 06-27-2008 08:44 PM
Click Here to See the Profile for LoRd_MuldeR Click here to Send LoRd_MuldeR a Private Message Click Here to Email LoRd_MuldeR Visit LoRd_MuldeR's homepage! Find more posts by LoRd_MuldeR Add LoRd_MuldeR to your buddy list Edit/Delete Message Reply w/Quote
LoRd_MuldeR
Senior Member

Registered: Sep 2005
From: Germany

Here is a small update. You can now decide whether you want to terminate the process on timeout or leave it alone. Anyway, if the timeout is exceeded, the control will return to the installer immediately.

Attachment: exectimeout.2008-06-28.zip
This has been downloaded 123 time(s).

Quick Link | Report this post to a moderator | IP: Logged

LoRd_MuldeR is offline Old Post 06-27-2008 11:02 PM
Click Here to See the Profile for LoRd_MuldeR Click here to Send LoRd_MuldeR a Private Message Click Here to Email LoRd_MuldeR Visit LoRd_MuldeR's homepage! Find more posts by LoRd_MuldeR Add LoRd_MuldeR to your buddy list Edit/Delete Message Reply w/Quote
LoRd_MuldeR
Senior Member

Registered: Sep 2005
From: Germany

Another update:
Better method to pass the parameters and simplification of the return value

Attachment: exectimeout.2008-07-01.zip
This has been downloaded 106 time(s).

Quick Link | Report this post to a moderator | IP: Logged

LoRd_MuldeR is offline Old Post 07-01-2008 09:18 PM
Click Here to See the Profile for LoRd_MuldeR Click here to Send LoRd_MuldeR a Private Message Click Here to Email LoRd_MuldeR Visit LoRd_MuldeR's homepage! Find more posts by LoRd_MuldeR Add LoRd_MuldeR to your buddy list Edit/Delete Message Reply w/Quote
Afrow UK
Moderator

Registered: Nov 2002
From: Shropshire, England

You should use the Wiki to upload your file.
http://nsis.sf.net/File:ExecTimeout.zip

Stu

__________________
afrowuk.co.uk

Quick Link | Report this post to a moderator | IP: Logged

Afrow UK is offline Old Post 07-01-2008 09:27 PM
Click Here to See the Profile for Afrow UK Click here to Send Afrow UK a Private Message Click Here to Email Afrow UK Visit Afrow UK's homepage! Find more posts by Afrow UK Add Afrow UK to your buddy list Edit/Delete Message Reply w/Quote
LoRd_MuldeR
Senior Member

Registered: Sep 2005
From: Germany

You think it's worth a wiki page? ^^

__________________
My Plugins: NSISList | ExecTimeout | KillProc

Quick Link | Report this post to a moderator | IP: Logged

LoRd_MuldeR is offline Old Post 07-01-2008 09:35 PM
Click Here to See the Profile for LoRd_MuldeR Click here to Send LoRd_MuldeR a Private Message Click Here to Email LoRd_MuldeR Visit LoRd_MuldeR's homepage! Find more posts by LoRd_MuldeR Add LoRd_MuldeR to your buddy list Edit/Delete Message Reply w/Quote
Afrow UK
Moderator

Registered: Nov 2002
From: Shropshire, England

Sure why not. Otherwise as you add new versions people will never get them. People tend to get the first download in the first post and neglect to find the latest.

Stu

__________________
afrowuk.co.uk

Quick Link | Report this post to a moderator | IP: Logged

Afrow UK is offline Old Post 07-01-2008 09:43 PM
Click Here to See the Profile for Afrow UK Click here to Send Afrow UK a Private Message Click Here to Email Afrow UK Visit Afrow UK's homepage! Find more posts by Afrow UK Add Afrow UK to your buddy list Edit/Delete Message Reply w/Quote
Red Wine
Forum King

Registered: Mar 2006
From: Ath. GR

Besides that Stu said, after 2-3 days of inactivity this thread will get lost between 1000s threads of the forum.
A wiki page is always easy accessible, thus useful to everybody anytime.

__________________
Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS

Quick Link | Report this post to a moderator | IP: Logged

Red Wine is offline Old Post 07-01-2008 09:49 PM
Click Here to See the Profile for Red Wine Click here to Send Red Wine a Private Message Find more posts by Red Wine Add Red Wine to your buddy list Edit/Delete Message Reply w/Quote
LoRd_MuldeR
Senior Member

Registered: Sep 2005
From: Germany

Okay, I have created a wiki page
http://nsis.sourceforge.net/ExecTimeout_plug-in

__________________
My Plugins: NSISList | ExecTimeout | KillProc

Quick Link | Report this post to a moderator | IP: Logged

LoRd_MuldeR is offline Old Post 07-01-2008 10:08 PM
Click Here to See the Profile for LoRd_MuldeR Click here to Send LoRd_MuldeR a Private Message Click Here to Email LoRd_MuldeR Visit LoRd_MuldeR's homepage! Find more posts by LoRd_MuldeR Add LoRd_MuldeR to your buddy list Edit/Delete Message Reply w/Quote
Afrow UK
Moderator

Registered: Nov 2002
From: Shropshire, England

You should re-upload as ExecTimeout.zip. Notice that re-uploading the file under the same name builds a revision history:
http://nsis.sourceforge.net/File:LockedList.zip

Stu

__________________
afrowuk.co.uk

Quick Link | Report this post to a moderator | IP: Logged

Afrow UK is offline Old Post 07-02-2008 09:01 AM
Click Here to See the Profile for Afrow UK Click here to Send Afrow UK a Private Message Click Here to Email Afrow UK Visit Afrow UK's homepage! Find more posts by Afrow UK Add Afrow UK to your buddy list Edit/Delete Message Reply w/Quote
elllit
Junior Member

Registered: Jun 2008
From: Germany

Hi,

hmm... i don't quiet get it...

Where's the difference to nsExec with the /TIMEOUT=x flag?

Anyways, thanks for your support on it LoRd_MuldeR.

Edit:

Here a line of code from my installer:

code:
nsExec::ExecToStack /TIMEOUT=$0 'mycmd'

Quick Link | Report this post to a moderator | IP: Logged

elllit is offline Old Post 07-02-2008 09:57 AM
Click Here to See the Profile for elllit Click here to Send elllit a Private Message Click Here to Email elllit Find more posts by elllit Add elllit to your buddy list Edit/Delete Message Reply w/Quote
LoRd_MuldeR
Senior Member

Registered: Sep 2005
From: Germany

quote:
Originally posted by elllit
Hi,

hmm... i don't quiet get it...

Where's the difference to nsExec with the /TIMEOUT=x flag?



If I understand nsExec correctly, then it the /TIMEOUT param will return control to the installer if there was no output by the application for x milliseconds. Also the timeout will be reset when there is new output. So this is only useful for console applications, that write stuff to stdout. It's not useful for GUI applications! Also I'm not sure whether nsExec will terminate the process on timeout or simply leave it alone. My plugin can do both! And it doesn't care about console output, it simply returns control to the installer after a maximum of x milliseconds. So you can be sure that your installer won't stall! Using nsExec an application could constantly write random stuff to stdout and do so until forever. So that application would never timeout and your installer will stall...

Of course my ExecTimeout plugin is useless if you need to capture the console output. It was never intended to do that. I said it's a very simple plugin...


code:
The timeout value is optional. The timeout is the time in milliseconds nsExec will wait for output. If output from the process is received, the timeout value is reset and it will again wait for more output using the timeout value.

Last edited by LoRd_MuldeR on 07-02-2008 at 01:33 PM

Quick Link | Report this post to a moderator | IP: Logged

LoRd_MuldeR is offline Old Post 07-02-2008 12:58 PM
Click Here to See the Profile for LoRd_MuldeR Click here to Send LoRd_MuldeR a Private Message Click Here to Email LoRd_MuldeR Visit LoRd_MuldeR's homepage! Find more posts by LoRd_MuldeR Add LoRd_MuldeR to your buddy list Edit/Delete Message Reply w/Quote
Afrow UK
Moderator

Registered: Nov 2002
From: Shropshire, England

I have moved the plug-in download to http://nsis.sourceforge.net/File:ExecTimeout.zip.
If you need to upload revisions upload to that page and put the date as the summary.

Stu

__________________
afrowuk.co.uk

Quick Link | Report this post to a moderator | IP: Logged

Afrow UK is offline Old Post 07-02-2008 01:41 PM
Click Here to See the Profile for Afrow UK Click here to Send Afrow UK a Private Message Click Here to Email Afrow UK Visit Afrow UK's homepage! Find more posts by Afrow UK Add Afrow UK to your buddy list Edit/Delete Message Reply w/Quote
elllit
Junior Member

Registered: Jun 2008
From: Germany

LoRd_MuldeR,

thanks for the clarification.

Quick Link | Report this post to a moderator | IP: Logged

elllit is offline Old Post 07-02-2008 02:03 PM
Click Here to See the Profile for elllit Click here to Send elllit a Private Message Click Here to Email elllit Find more posts by elllit Add elllit to your buddy list Edit/Delete Message Reply w/Quote
LoRd_MuldeR
Senior Member

Registered: Sep 2005
From: Germany

I have uploaded an example that illustrates the difference:

Attachment: timeoutdemo.zip
This has been downloaded 154 time(s).

Quick Link | Report this post to a moderator | IP: Logged

LoRd_MuldeR is offline Old Post 07-02-2008 02:20 PM
Click Here to See the Profile for LoRd_MuldeR Click here to Send LoRd_MuldeR a Private Message Click Here to Email LoRd_MuldeR Visit LoRd_MuldeR's homepage! Find more posts by LoRd_MuldeR Add LoRd_MuldeR to your buddy list Edit/Delete Message Reply w/Quote
elllit
Junior Member

Registered: Jun 2008
From: Germany

Thanks a bunch!

I will move over to your plug-in as it seems less error prone from useage side. At least on my concern.

Quick Link | Report this post to a moderator | IP: Logged

elllit is offline Old Post 07-03-2008 08:36 AM
Click Here to See the Profile for elllit Click here to Send elllit a Private Message Click Here to Email elllit Find more posts by elllit Add elllit to your buddy list Edit/Delete Message Reply w/Quote
All times are GMT. The time now is 09:41 PM. Post New Thread    Post A Reply
  Last Thread   Next Thread
WINAMP.COM | Forums : Powered by vBulletin version 2.3.9 WINAMP.COM | Forums > Developer Center > NSIS Discussion > ExecTimeout Plugin
Show Printable Version
 | 
Email this Page
 | 
Subscribe to this Thread

Forum Jump:
 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is off
vB code is ON
Smilies are ON
[IMG] code is ON