简体   繁体   English

Windows 8.1无法运行批处理文件而没有命令提示符闪烁

[英]Windows 8.1 unable to run batch file without command prompt flashing

I have scheduled a task to run a batch file, and currently every time the task executes, there is a command prompt box that flashes. 我已经安排了一个任务来运行批处理文件,当前每次执行该任务时,都会闪烁一个命令提示符框。 This is very undesirable. 这是非常不希望的。 The node.js command prompt window executes minimized correctly, it is the windows command prompt that flashes. node.js命令提示符窗口会最小化正确执行,这是Windows命令提示符闪烁。 Here is the action that the scheduled task runs: 这是计划任务运行的操作:

cmd /min /c "C:\Users\computeruser\Building Intelligence\javadobe\runCheck.bat"

and here is the contents of the batch file, (probably unnecessary to show, but I was originally trying to run these commands straight from the task scheduler. Putting them in this batch file instead has got me closest to what I actually want to happen: run a javascript file with node.js minimized): 这是批处理文件的内容,(可能不需要显示,但是我本来是试图直接从任务计划程序运行这些命令的。将它们放在此批处理文件中,使我与实际发生的事情最接近:运行最小化node.js的javascript文件):

cd "C:\Program Files (x86)\BuildingIntelligence\javadobe\" & START /MIN node index.js /exit

A list of the commands I've tried: 我尝试过的命令列表:

cmd.exe /c start /min "C:\Users\computeruser\Building Intelligence\javadobe\runCheck.bat"
cmd.exe /c start /min "C:\Users\computeruser\Building Intelligence\javadobe\runCheck.bat" & /exit
%comspec% /c start "" /min "C:\Users\computeruser\Building Intelligence\javadobe\runCheck.bat"

all of these commands leave the command prompt box open, not closing it but minimizing it after it opens. 所有这些命令都会使命令提示符框保持打开状态,而不是将其关闭,而是打开后将其最小化。 There is also a notification that says "not enough storage is available to process this command". 还有一条通知,指出“没有足够的存储空间来处理此命令”。

I need to run this task with the highest privileges, and while it needs to be invisible most of the time, it needs to be able to show a dialog box occasionally when the task is run. 我需要以最高特权运行此任务,尽管大多数时候它需要不可见,但它需要能够在任务运行时偶尔显示一个对话框。

Thanks in advance for any help! 在此先感谢您的帮助!

Basically, if what you have tried doesn't work, you're going to need a third party tool. 基本上,如果您尝试的内容不起作用,则将需要第三方工具。 NirCMD should do it and it's freeware. NirCMD应该做到这一点,它是免费软件。

NirCMD exec hide "C:\Users\computeruser\Building Intelligence\javadobe\runCheck.bat"

At the bottom of this page there is a link for the download. 此页面的底部,有一个下载链接。 This page covers what the tool is capable of. 此页面涵盖了该工具的功能。

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

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