运行 计划任务已最小化
Run Scheduled Task Minimized
我已经使用 Windows 调度程序将控制台应用设置为每分钟 运行。但是,当计划任务 运行s 时,会短暂弹出一个 CMD 屏幕。这有点烦人,我希望任务在最小化时启动,然后关闭。
查看现有资源,我尝试过:
1) "Run whether user is logged on or not": 没有任何反应,我在文件中没有看到执行成功时应该发生的任何条目。
2) 从 .exe 创建一个快捷方式并使快捷方式 运行 最小化:快捷方式被转换为实际的应用程序并 运行 最大化。
如果您将控制台应用程序编译为 Windows Application
,它将一起隐藏 cmd
window。
如果使用 Visual Studio,请右键单击项目 -> Properties -> Application -> 输出类型: -> Windows 应用程序
对于初学者,如果您是 运行 控制台应用程序,请在命令提示符中尝试 运行 start /?
。试试 /min
选项看看是否有帮助。
C:\Users\help.me>start /?
Starts a separate window to run a specified program or command.
START ["title"] [/D path] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
[/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
[/NODE <NUMA node>] [/AFFINITY <hex affinity mask>] [/WAIT] [/B]
[command/program] [parameters]
"title" Title to display in window title bar.
path Starting directory.
B Start application without creating a new window. The
application has ^C handling ignored. Unless the application
enables ^C processing, ^Break is the only way to interrupt
the application.
I The new environment will be the original environment passed
to the cmd.exe and not the current environment.
MIN Start window minimized.
MAX Start window maximized.
SEPARATE Start 16-bit Windows program in separate memory space.
SHARED Start 16-bit Windows program in shared memory space.
LOW Start application in the IDLE priority class.
NORMAL Start application in the NORMAL priority class.
HIGH Start application in the HIGH priority class.
REALTIME Start application in the REALTIME priority class.
ABOVENORMAL Start application in the ABOVENORMAL priority class.
BELOWNORMAL Start application in the BELOWNORMAL priority class.
NODE Specifies the preferred Non-Uniform Memory Architecture (NUMA)
node as a decimal integer.
我已经使用 Windows 调度程序将控制台应用设置为每分钟 运行。但是,当计划任务 运行s 时,会短暂弹出一个 CMD 屏幕。这有点烦人,我希望任务在最小化时启动,然后关闭。
查看现有资源,我尝试过:
1) "Run whether user is logged on or not": 没有任何反应,我在文件中没有看到执行成功时应该发生的任何条目。
2) 从 .exe 创建一个快捷方式并使快捷方式 运行 最小化:快捷方式被转换为实际的应用程序并 运行 最大化。
如果您将控制台应用程序编译为 Windows Application
,它将一起隐藏 cmd
window。
如果使用 Visual Studio,请右键单击项目 -> Properties -> Application -> 输出类型: -> Windows 应用程序
对于初学者,如果您是 运行 控制台应用程序,请在命令提示符中尝试 运行 start /?
。试试 /min
选项看看是否有帮助。
C:\Users\help.me>start /?
Starts a separate window to run a specified program or command.
START ["title"] [/D path] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
[/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
[/NODE <NUMA node>] [/AFFINITY <hex affinity mask>] [/WAIT] [/B]
[command/program] [parameters]
"title" Title to display in window title bar.
path Starting directory.
B Start application without creating a new window. The
application has ^C handling ignored. Unless the application
enables ^C processing, ^Break is the only way to interrupt
the application.
I The new environment will be the original environment passed
to the cmd.exe and not the current environment.
MIN Start window minimized.
MAX Start window maximized.
SEPARATE Start 16-bit Windows program in separate memory space.
SHARED Start 16-bit Windows program in shared memory space.
LOW Start application in the IDLE priority class.
NORMAL Start application in the NORMAL priority class.
HIGH Start application in the HIGH priority class.
REALTIME Start application in the REALTIME priority class.
ABOVENORMAL Start application in the ABOVENORMAL priority class.
BELOWNORMAL Start application in the BELOWNORMAL priority class.
NODE Specifies the preferred Non-Uniform Memory Architecture (NUMA)
node as a decimal integer.