Page 1 of 2 12>
Topic Options
#143970 - 2005-07-20 08:36 PM Avoid "piping"
Maik Offline
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
#143971 - 2005-07-20 08:46 PM Re: Avoid "piping"
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
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.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#143972 - 2005-07-20 08:51 PM Re: Avoid "piping"
Maik Offline
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
#143973 - 2005-07-20 08:55 PM Re: Avoid "piping"
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Functions will spill the return code to the console if unhandled 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.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#143974 - 2005-07-20 08:58 PM Re: Avoid "piping"
Maik Offline
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 Moderator Offline
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 Offline
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
#143977 - 2005-07-20 09:08 PM Re: Avoid "piping"
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Ah.... good old NT4 WSH is also seperatly available from MS from here: MS WSH download page
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#143978 - 2005-07-20 09:12 PM Re: Avoid "piping"
Maik Offline
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
#143979 - 2005-07-20 09:21 PM Re: Avoid "piping"
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Hmmm...out of options for now.

Deploying WSH (or even better IE6 sp1) by use of sms or something could be an option if you are using sms or some other central app installer.

If there is no way to install WSH or IE using some kind of central app installer and if the exe has no silent switch is it such a bad thing that you see some screen output?
No output would be nice but hey sometime you just have to take it how it comes.

Maybe get your sneakers out of the closet and start running on sneakernet
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#143980 - 2005-07-20 09:42 PM Re: Avoid "piping"
Maik Offline
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
#143981 - 2005-07-20 09:51 PM Re: Avoid "piping"
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Quote:

I tried it with both NUL and the other one but both failed...



Show us what you tried. Maybe you did it wrong. Did you read the FAQ?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#143982 - 2005-07-20 10:52 PM Re: Avoid "piping"
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Was going to ask the same thing as Les, show us your code. Don't forget ... command-line redirection only works with SHELL, no worky with RUN.
Top
#143983 - 2005-07-20 11:44 PM Re: Avoid "piping"
NTDOC Administrator Offline
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
#143984 - 2005-07-21 01:23 AM Re: Avoid "piping"
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
as explained in the FAQ.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#143985 - 2005-07-21 04:12 AM Re: Avoid "piping"
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
I know it is so I assume you meant this for Maik
Top
#143986 - 2005-07-21 04:24 AM Re: Avoid "piping"
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Actually, directed at anyone that cares.

I also explained it by saying "The command interpreter can, if called upon redirect output to nul but in your example you don't use it" but I see you routinely like to one-up my replies.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#143987 - 2005-07-21 06:41 AM Re: Avoid "piping"
NTDOC Administrator Offline
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 Offline
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
#143989 - 2005-07-21 09:03 PM Re: Avoid "piping"
oobnuker Offline
Getting the hang of it

Registered: 2003-12-09
Posts: 87
Loc: Oxford, CT
Quote:

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




Off Topic: These guys are a TRIP! Even with a combined 50,000 posts between the most commonly seen moderators, they bicker like school children sometimes. I love it. Not for nothing though, there is an amazing wealth of knowledge on this board.
_________________________
-- oobnuker - .KIX hack - no really.

Top
Page 1 of 2 12>


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 249 anonymous users online.
Newest Members
rrosell, PatrickPinto, Raoul, Timothy, Jojo67
17877 Registered Users

Generated in 0.077 seconds in which 0.027 seconds were spent on a total of 14 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org