DosTips.com

A Forum all about DOS Batch
It is currently 06 Feb 2016 14:25

All times are UTC-06:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 17 May 2012 22:09 
Offline

Joined: 31 Mar 2012 21:31
Posts: 160
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


Top
   
PostPosted: 18 May 2012 00:22 
Offline

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


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC-06:00


Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 11 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® Forum Software © phpBB Limited