简体   繁体   中英

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. 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):

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 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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