[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[其他] [已解决]有些命令行强制输出是怎么回事呢?

微软的工具集pstools中的工具psservice.exe,当执行后,都要强制输出个版本信息之类的,我想
将其屏蔽掉,但是使用了如下命令后,仍然打印了版本信息,我该怎么办?

psservice.exe>123.txt
1

评分人数

    • Batcher: 感谢给帖子标题标注[已解决]字样PB + 2

回复 1# shootman2
试试
  1. psservice.exe >nul 2>nul
复制代码

TOP

那个信息是通过2号句柄输出的
psservice.exe >123.txt 2>&1
我帮忙写的代码不需要付钱。如果一定要给,请在微信群或QQ群发给大家吧。
【微信公众号、微信群、QQ群】http://bbs.bathome.net/thread-3473-1-1.html
【支持批处理之家,加入VIP会员!】http://bbs.bathome.net/thread-67716-1-1.html

TOP

cout        standard output stream
cerr        standard error (output) stream
clog        standard logging (output) stream

TOP

以上三位全是高手,向大神膜拜ing!

TOP

回复 4# 523066680

cout        standard output stream
cerr        standard error (output) stream
clog        standard logging (output) stream

您的意思是
cout   1
cerr    2
clog    3

是这样的吗?

TOP

回复 3# Batcher

那个信息是通过2号句柄输出的
psservice.exe >123.txt 2>&1

Batcher老师,2>&1是啥意思呢?

TOP

回复 1# shootman2


   我电脑是这样的  'psservice.exe' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
不过也许你可以以nul屏蔽掉
psservice.exe>123.txt  >nul 2>nul

TOP

我帮忙写的代码不需要付钱。如果一定要给,请在微信群或QQ群发给大家吧。
【微信公众号、微信群、QQ群】http://bbs.bathome.net/thread-3473-1-1.html
【支持批处理之家,加入VIP会员!】http://bbs.bathome.net/thread-67716-1-1.html

TOP

回复 8# 凡凡之呗


    你需要先下载pstools工具包才能用这个命令
我帮忙写的代码不需要付钱。如果一定要给,请在微信群或QQ群发给大家吧。
【微信公众号、微信群、QQ群】http://bbs.bathome.net/thread-3473-1-1.html
【支持批处理之家,加入VIP会员!】http://bbs.bathome.net/thread-67716-1-1.html

TOP

回复 10# Batcher


    已经下载   也不知道怎么用   看来还要走很长的路

TOP

回复 11# 凡凡之呗


    Pstools.chm这个帮助文档里面有详细的说明和例子
我帮忙写的代码不需要付钱。如果一定要给,请在微信群或QQ群发给大家吧。
【微信公众号、微信群、QQ群】http://bbs.bathome.net/thread-3473-1-1.html
【支持批处理之家,加入VIP会员!】http://bbs.bathome.net/thread-67716-1-1.html

TOP

返回列表