如何从 Windows XP 批处理文件设置处理器关联?
我有一台双处理器机器,我想通过两个处理器上的批处理文件启动可执行文件。
例如: (1) 在处理器 1 上启动 Notepad.exe,并且 (2) 同时,处理器 2 上的 Notepad.exe
目前,我在批处理文件中使用以下内容,因为我的可执行文件“难以”启动并且需要返回才能在启动时运行: echo.|DoStuff.exe
因此,我想启动它并让它在每个处理器上运行。
感谢您提供的任何反馈。
PS 我认为“开始”对我不起作用,因为我需要将返回字符发送到可执行文件,如上所示,并带有 echo。
PSS 这是针对 Windows XP 解决方案。 谢谢。
I've got a dual processor machine and I would like to launch an executable via a batch file on both processors.
For example:
(1) Launch Notepad.exe on Processor 1, and
(2) Simultaneously, Notepad.exe on Processor 2
Currently, I'm using the following in my batch file, since my executable was "difficult" to launch and needed a return in order to run when launched:
echo.|DoStuff.exe
Thus, I would like to launch it and have it run on each processor.
Thanks for any feedback provided.
P.S. I don't think "start" will work for me since I need to send in the return character to the executable as shown above with echo.
P.S.S. This is for a Windows XP solution. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
start /affinity 1 notepad.exe
start /affinity 2 notepad.exe
(Windows7 对启动命令有亲和力,但 XP 没有。PSexec 可以用)
start /affinity 1 notepad.exe
start /affinity 2 notepad.exe
(Windows7 has affinity for the start command, but XP does not. PSexec works though)
Microsoft Sysinternal 的 psexec 的 -a 标志可以在 Windows XP 上设置处理器关联:
例如:
Microsoft's Sysinternal's psexec's -a flag can set processor affinity on Windows XP:
For example:
此页面谈论免费
称为 XCPU 的工具,您可以使用
启动并设置亲和力。 但是,那
里面的链接不起作用。 也许有一点
谷歌搜索可以为您找到它。
还有一个类似的工具
这里称为runfirst。
This page talks about a free
tool called XCPU you can use to
launch and set affinity. However the
link within doesn't work. Maybe a bit
of googling can locate it for you.
And there is a simmillar tools
here called runfirst.