简体   繁体   English

Winver 命令在批处理文件中的异常行为

[英]Winver command anomalous behavior in batch file

I've a batch file that has only single command in it.我有一个批处理文件,其中只有一个命令。

winver

When I execute this batch file, nothing shows up but the command seems to execute in an uncontrolled loop.当我执行这个批处理文件时,没有任何显示,但命令似乎在不受控制的循环中执行。

But when I type winver in command prompt, a window opens that shows up the version of the Windows OS I'm currently using.但是当我在命令提示符下键入winver时,会打开一个窗口,显示我当前使用的 Windows 操作系统的版本。 My question is why isn't this command working when I place it in batch file.我的问题是当我把它放在批处理文件中时,为什么这个命令不起作用。

Thanks in advance提前致谢

Use as batch file name different from "winver.bat" with the single line "start winver".使用单行“start winver”作为不同于“winver.bat”的批处理文件名。 Regards, Erich问候, 埃里希

以管理员权限运行它解决了这个目的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM