View unanswered posts | View active topics It is currently 20 Sep 2014 20:01



Post new topic Reply to topic  [ 2 posts ] 
psexec and ERROR: Input redirection... 
Author Message

Joined: 31 Mar 2012 21:31
Posts: 160
Post psexec and ERROR: Input redirection...
I'm not sure if this post is outside the scope/expertise of the gurus here. So, I thought I would ask anyway.

I've been using psexec.exe alot in my scripts latetly to conveniently execute processes on remote servers. However, recently, I received the error message when running my batch file. However, I'm not exactly sure what's causing it. The odd thing is I was able to successfully do something very similar to this at the command line without any issues. If Im using input redirection, then I'm not doing it intentionally. As far as I know, all I'm doing is output redirection. If this is somehow a weird quirtwith psexec, maybe someone would know an alternate way?

ERROR: Input redirection is not supported, exiting the process immediately.

Code:
%MYFILES%\psexec \\%UserInput% c:\windows\system32\mt.exe mediastatus tape0 2>NUL| find "No media in drive." 1>NUL 2>&1


17 May 2012 22:09
Profile

Joined: 10 Feb 2012 02:20
Posts: 4191
Post Re: psexec and ERROR: Input redirection...
The 2>&1 is superfluous as you'd redirected stderr in the leading command and find will never return stderr output in normal operation.


18 May 2012 00:22
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 


Who is online

Users browsing this forum: Baidu [Spider], Google [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Forum style by Vjacheslav Trushkin for Free Forums/DivisionCore.