#143970 - 2005-07-20 08:36 PM
Avoid "piping"
|
Maik
Getting the hang of it
Registered: 2003-01-14
Posts: 87
|
Hello, I start an EXE "Shell foo.exe" within my script. The problem is now, that these EXE pipes a message (also when I use "Run foo.exe")in the console that I want to avoid.
I cannot set Code:
setconsole("hide") due to different reasons.
Is there any way to get rid of this?
Maik
|
Top
|
|
|
|
#143972 - 2005-07-20 08:51 PM
Re: Avoid "piping"
|
Maik
Getting the hang of it
Registered: 2003-01-14
Posts: 87
|
Quote:
As far as I can see it's only avoidable if the exe has some sort of silent switch. There is no way to "shut up" an external exe by using kix imho.
Thought that maybe some NUL or 2>&1 would work...
Maik
|
Top
|
|
|
|
#143974 - 2005-07-20 08:58 PM
Re: Avoid "piping"
|
Maik
Getting the hang of it
Registered: 2003-01-14
Posts: 87
|
Quote:
Functions will spill the return code to the console if unandled and I see you don't handle it in your example. The command interpreter can, if called upon redirect output to nul but in your example you don't use it.
There are FAQs on both topics.
I tried it with both NUL and the other one but both failed...
Maik
|
Top
|
|
|
|
#143975 - 2005-07-20 09:01 PM
Re: Avoid "piping"
|
Mart
KiX Supporter
Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
|
Don't know if this works for you, can't test right now but how about the WSHPipe() udf? This pipes the result of a shell command to an array. If you than just not display the contents of the array..... Didn't think of this earlier.
It's here: http://www.kixtart.org/ubbthreads/showfl...part=1&vc=1
Edited by Mart (2005-07-20 09:02 PM)
|
Top
|
|
|
|
#143976 - 2005-07-20 09:05 PM
Re: Avoid "piping"
|
Maik
Getting the hang of it
Registered: 2003-01-14
Posts: 87
|
Quote:
Don't know if this works for you, can't test right now but how about the WSHPipe() udf? This pipes the result of a shell command to an array. If you than just not display the contents of the array..... Didn't think of this earlier.
It's here: http://www.kixtart.org/ubbthreads/showfl...part=1&vc=1
Indeed, this can be an option but it must work on Windows NT 4.to; and on most of the clients is no IE 6 installed...
Maik
|
Top
|
|
|
|
#143978 - 2005-07-20 09:12 PM
Re: Avoid "piping"
|
Maik
Getting the hang of it
Registered: 2003-01-14
Posts: 87
|
Quote:
Ah.... good old NT4 WSH is also seperatly available from MS from here: MS WSH download page
Yes, but to install it on 1000 PC's now (we migrate soon) is a little bit oversized. So I must find a workaround for this piping issue...
Maik
|
Top
|
|
|
|
#143980 - 2005-07-20 09:42 PM
Re: Avoid "piping"
|
Maik
Getting the hang of it
Registered: 2003-01-14
Posts: 87
|
Quote:
Hmmm...out of options for now.
Sadly yes, got another issue with the pbar UDF...
|
Top
|
|
|
|
#143983 - 2005-07-20 11:44 PM
Re: Avoid "piping"
|
NTDOC
Administrator
Registered: 2000-07-28
Posts: 11624
Loc: CA
|
Think you ran your FOO.EXE without %comspec%
Mabye something like this.
Code:
SHELL '%COMSPEC% /E:1024 /C c:\temp\foo.exe >nul 2>nul'
|
Top
|
|
|
|
#143987 - 2005-07-21 06:41 AM
Re: Avoid "piping"
|
NTDOC
Administrator
Registered: 2000-07-28
Posts: 11624
Loc: CA
|
Not really, just often think new users would appreciate either an actual link or example rather then a single sentence is all. I'm not trying to "One up you".
If you don't have or want to spend the extra time to give the link or example code that's fine. I'm not knocking you in any way. I don't always supply it either, but when I have the time or ambition I try to supply it, that's all. Not quite everything you wanted to know about RUN and SHELL
|
Top
|
|
|
|
#143988 - 2005-07-21 09:21 AM
Re: Avoid "piping"
|
Maik
Getting the hang of it
Registered: 2003-01-14
Posts: 87
|
Calm down guys!
Found a way. Calling an other KIX and do the "piping" things in this one (hidden) does the trick. Thanks for your help!
Maik
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 249 anonymous users online.
|
|
|