WINAMP.COM | Forums > Developer Center > NSIS Discussion > dosExecute plugin |
Last Thread
Next Thread
|
| Author |
|
|
Takhir Major Dude
Registered: Feb 2004 |
dosExecute plugin
2 parameters - program to start and string to use as stdin for program. Plugin creates child process with redirected i/o (pipes). Works in debug mode now - few Windows popup message boxes appears and console application window is visible - I'll change mode to SH_HIDE and remove messages in next version. Please note following string in execDos.nsi file (see attachment):
|
||
|
|
|
Takhir Major Dude
Registered: Feb 2004 |
Project and binaries
Plugin takes 2 strings from stack (application name and stdin text), creates hidden child process with redirected I/O, writes input string parameter to redirected stdin (pipe buffering works fine) and catches stdout. Returns to stack application' exit code.
|
||
|
|
|
Takhir Major Dude
Registered: Feb 2004 |
Few versions were published in related threads, but it will be better to continue here
|
||
|
|
|
Takhir Major Dude
Registered: Feb 2004 |
Updated to support long strings - now plug-in allocates string buffers according to incoming string_size parameter. This may be 8k for special NSIS build (1024 otherwise). I guess this is also stack string size.
|
||
|
|
|
Takhir Major Dude
Registered: Feb 2004 |
Plug-in waits application to close it's stdout (all done), after this waits for exit_code_process (up to 2 sec) and exits after this only. This is "wait" mode I guess. So once again - is pbtl.exe DOS or "windowed" application? In the last case DOS plug-ins is a wrong way. |
||
|
|
|
bdfy Junior Member
Registered: Feb 2005 |
pbtl.exe is DOS-applicattion and it works about 10 sec in my installer. |
||
|
|
|
Takhir Major Dude
Registered: Feb 2004 |
During email conversation it was found that the main problem is bad plug-in manual (NSIS tradition
|
||
|
|
|
bdfy Junior Member
Registered: Feb 2005 |
Takhir |
||
|
|
|
Anders Major Dude
Registered: Jun 2002 |
as far is i know, this bat file will autoclose on all systems: code: |
||
|
|
|
bdfy Junior Member
Registered: Feb 2005 |
Anders |
||
|
|
|
Takhir Major Dude
Registered: Feb 2004 |
This is not plug-in problem code: Now exit codes of 3 runs are 0, 1 and 1; resistance.pbo file size changed, looks working. Full script sent by email. 2 Anders: XP&2K - no problem, but on Win98 it's a real head pain... In my tests hidden Winoldapps on Win98 remain in Ctrl-Alt-Del list and create problem on next reboot
|
||
|
|
|
bdfy Junior Member
Registered: Feb 2005 |
Takhir |
||
|
|
|
Takhir Major Dude
Registered: Feb 2004 |
Sorry, Anders, I re-tested on Win98 and found that your code works! No Oldapps in the tasks list. I searched google but not found this decision.. Thanks |
||
|
|
|
Guillaume.L Guest
Registered: Not Yet |
How do I install your plugin? |
||
|
|
|
|
Takhir Major Dude
Registered: Feb 2004 |
1. Download the package http://forums.winamp.com/attachment...;postid=1587794 (attached to the post above). |
||
|
|
|
Takhir Major Dude
Registered: Feb 2004 |
Updated wiki page |
||
|
|
|
Guillaume.L Guest
Registered: Not Yet |
Is there a way not to make it hide the dos window if there is one? |
||
|
|
|
|
Takhir Major Dude
Registered: Feb 2004 |
Use ExecWait NSIS Instruction (Documentation, 4.9.1.4). |
||
|
|
|
Takhir Major Dude
Registered: Feb 2004 |
New options (wiki page): |
||
|
|
|
DarkAvenger Junior Member
Registered: Jun 2006 |
Hi Takhir, |
||
|
|
|
Takhir Major Dude
Registered: Feb 2004 |
It is possible, but most of used API calls marked in MSDN as NT (XP?) compatible only, so we can lose Win9x this case. |
||
|
|
|
DarkAvenger Junior Member
Registered: Jun 2006 |
Takhir, Last edited by DarkAvenger on 06-14-2006 at 07:03 PM |
||
|
|
|
dmccordjr Junior Member
Registered: Jun 2006 |
Please, I humbly |
||
|
|
|
Takhir Major Dude
Registered: Feb 2004 |
If not set, timeout is 0xffffff ms = 4 hours. You can define it as 0xffffffff this will be 256 times more. Is this enough? |
||
|
|
|
dmccordjr Junior Member
Registered: Jun 2006 |
Takir |
||
|
|
|
Takhir Major Dude
Registered: Feb 2004 |
May be you need no-wait application launch, this case use ExecShell (NSIS command) or WinExec (via System plug-in). Both support SW_HIDE parameter and not waits a process exit (and allows installer to finish). |
||
|
|
|
Clammerz Junior Member
Registered: Apr 2006 |
Sorry if I'm bumping the wrong thread, but this was the thread linked to on the Wiki page. |
||
|
|
|
Takhir Major Dude
Registered: Feb 2004 |
Plug-in pushes to stack as many (not empty) lines as it gets from app's stdout basing on '\n' delimiter (\r char just skipped). Long lines will be truncated on the NSIS line limit (1024-1 for common build). If log defined data go to file as well. |
||
|
|
|
Clammerz Junior Member
Registered: Apr 2006 |
Oh, thank you. |
||
|
|
|
Takhir Major Dude
Registered: Feb 2004 |
It is possible, may be I'll add new option next weekend (or you can do this earlier |
||
|
|
|
Takhir Major Dude
Registered: Feb 2004 |
I added /detailed option, while installer' Detailed window sync looks not very good with my test app - pauses and jumps when new items appear... |
||
|
|
|
thetw Junior Member
Registered: Apr 2004 |
Hello, I'm hoping this is the appropriate thread to ask this question... |
||
|
|
|
Takhir Major Dude
Registered: Feb 2004 |
Current version of ExecDos (July 2007) looks multibyte only. Unfortunately I have not NSIS Unicode installed now, so attached variant is 100% not tested. I just replaced char->TCHAR and added unicode release/debug configurations.
|
||
|
|
|
NsisUsernew Junior Member
Registered: Nov 2009 |
Regarding ExecDos
hi all, |
||
|
|
|
Takhir Major Dude
Registered: Feb 2004 |
gotoxy() sounds like terminal command. First print() sends CR, but after this you move marker back to previous line. None of NSIS plug-ins supports terminal emulation. |
||
|
|
|
NsisUsernew Junior Member
Registered: Nov 2009 |
Reason of using gotoxy(), is to set the cursor position, as my intention is to print |
||
|
|
|
Last Thread Next Thread
|
WINAMP.COM | Forums > Developer Center > NSIS Discussion > dosExecute plugin |
Forum Rules:
|