![]() |
Silence Fluffy Garbage Output |
Post Reply
|
Page 12> |
| Author | |
spoirier
Newbie
Joined: 13 June 2007 Location: United States Online Status: Offline Posts: 1 |
Post Options
Quote Reply
Topic: Silence Fluffy Garbage OutputPosted: 13 June 2007 at 9:58am |
|
This syntax will kill all screen output:
pslist -accepteula Explorer >nul 2>&1
This syntax will show the result but not the fluff:
pslist -accepteula Explorer 2>nul This syntax will show the fluff but not the result:
pslist -accepteula Explorer >nul
You can find more information about redirection at:
Hope you find this useful!
|
|
![]() |
|
acsdfields
Newbie
Joined: 02 January 2007 Online Status: Offline Posts: 4 |
Post Options
Quote Reply
Posted: 16 March 2007 at 11:47am |
|
One alternative not mentioned would be to install cygwin on the machine where you run most of your commands. Cygwin will give you a bash shell, so you get quite a bit more power for scripting. Of course this is not a solution for all problems, but it can make life easier.
Put me down as another vote for adding -q options to all of the tools (not just psexec). Very frustrating to have to filter out the fluff if you want to script something and produce a report based on the success/failure of the commands. |
|
![]() |
|
coreyfro
Newbie
Joined: 26 February 2007 Location: United States Online Status: Offline Posts: 6 |
Post Options
Quote Reply
Posted: 28 February 2007 at 2:11pm |
|
I pay tribute by biting my tongue and not complaining about windows. That way, there may be a supermodel in his future.
|
|
![]() |
|
Karlchen
Senior Member
Joined: 18 June 2005 Location: Germany Online Status: Offline Posts: 5121 |
Post Options
Quote Reply
Posted: 28 February 2007 at 12:30pm |
|
Hi, coreyfro.
Glad the old men in the forum could help.
By the way, you may have noticed that I supported your idea to suppress the programme logo - on demand - for scripting purposes. (Do not assume that my support will impress anybody too much ...) If you launch the programme on the commandline, the programme logo does not do any harm. Consider reading it as the tribute you pay to the programme author.
Ciao, Karl |
|
![]() |
|
coreyfro
Newbie
Joined: 26 February 2007 Location: United States Online Status: Offline Posts: 6 |
Post Options
Quote Reply
Posted: 28 February 2007 at 10:42am |
|
Thanks guys, the ^ trick works. Learn something new every day.
|
|
![]() |
|
coreyfro
Newbie
Joined: 26 February 2007 Location: United States Online Status: Offline Posts: 6 |
Post Options
Quote Reply
Posted: 28 February 2007 at 9:06am |
|
Because every time I complain about Microsoft, Gawd kills a supermodel that likes computer nerds. (Why yes, I am the reason they don't exist.)
BESIDES, the point of STDERR is to, oh, I don't know, output errors? In an interactive script, don't you think I'd like to see those? Maybe I should go back in time and suggest "STDBS" so everyone could spew BS from their command line tools, and we can all send it where it's sposta go, straight to the bit bucket. (Actually, that's not a bad idea, all headers could be sent that way for easy parsing. Hrm....) The fact of the matter is, inundating the user with garbage output is short sighted. I mean, really, why do I need to see this every time I run the program? PsGetSid v1.43 - Translates SIDs to names and vice versa Copyright (C) 1999-2006 Mark Russinovich Sysinternals - www.sysinternals.com Don't you think I know that? I downloaded the program, so I know where it's from, and I'm using it to capture sids, so I know what it is. And a copyright on a commandline tool? That's like a burka on a stripper. Even Microsoft isn't bold enough to put copyright information on DIR, and if they did, they at least have a /b option. This isn't required for the function of the program. It's fluff. I'm very anti-fluff. If you can't tell, I'm a Linux nerd struggling with the "closed source" Windows world. I could have fixed this by now, otherwise. In the Windows world, Mark Russinovich is a god for coming up with command line tools. In the Linux world, we expect more from our gods. I thank you for disclosing the alternative to my batch program. This will prove most useful.
Edited by coreyfro - 28 February 2007 at 10:40am |
|
![]() |
|
namrehto
Senior Member
Joined: 23 June 2005 Location: Scotland Online Status: Offline Posts: 3861 |
Post Options
Quote Reply
Posted: 27 February 2007 at 4:58am |
|
As Karl says, in such circumstances (e.g. embedded commands) any reserved shell character needs to be escaped (with a preceding ^), i.e.:
( ) < > ^ & | FWIW, there are one or two useful tools at http://internet.cybermesa.com/~bstewart/index.html, including Shell Scripting Toolkit HTH |
|
|
Gil
|
|
![]() |
|
Karlchen
Senior Member
Joined: 18 June 2005 Location: Germany Online Status: Offline Posts: 5121 |
Post Options
Quote Reply
Posted: 27 February 2007 at 4:31am |
|
Oh, by the way, you might try your command line this way:
Masking the offending characters from the commandline interpreter worked fine for me, used: psgetsid v1.42, WinXP Prof SP1 Karl |
|
![]() |
|
Karlchen
Senior Member
Joined: 18 June 2005 Location: Germany Online Status: Offline Posts: 5121 |
Post Options
Quote Reply
Posted: 27 February 2007 at 4:25am |
|
Hi, coreyfro.
Why do you blame psgetsid for writing to stderr and why do you not blame cmd.exe for failing to process "2>nul" in your for-loop?! ![]() I personally would not mind a new psgetsid.exe option, e.g. -q - quietly, do not display the programme header info on stderr. Maybe Mark will read this, like the idea and find the time to implement it. Yet, this decision is up to him. So for the moment you may need to live with a retarded workaround. (Life is full of workarounds.) ![]() Karl |
|
![]() |
|
coreyfro
Newbie
Joined: 26 February 2007 Location: United States Online Status: Offline Posts: 6 |
Post Options
Quote Reply
Posted: 26 February 2007 at 6:30pm |
|
Alas, i have found a way, but this isn't a nice thing to force your loving lusers to do
for /f "tokens=1* skip=1" %%i in ('shut_up_retarded_psgetsid.bat %1') do set local_user_sid=%%i Along with shut_up_retarded_psgetsid.bat @echo off
This is unnecessary complexity that should disappear. Please fix it. psgetsid %* 2> nul |
|
![]() |
|
Post Reply
|
Page 12> |
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |