How to hide an execution window in a Windows Task Plan

Source: Internet
Author: User

How to hide an execution window in a Windows Task Plan

Note: [task plan] is sometimes called a [scheduled task] and is commonly called a Windows scheduled task. In fact, the name of a scheduled task is actually [task plan]. Please refer, images and truth


When I was working on a project, I encountered a problem that was not a problem. I didn't hide the execution interface "small black window". The program would do the same. But if someone operates on this computer at the same time, if you accidentally close the black window of execution by mistake, a problem occurs, especially in the production environment,

So try several ways to solve this problem:

Method 1: Log On with different accounts

For example, if the currently logged-on user is administrator, you can create a user named Jack and select this user when changing the user or group,

You do not need to log on to this account when logging on. The "small black window" will not appear during each execution. Note: At this time, you must select [run regardless of whether the user logs on or not ],

Otherwise, the task plan will not be executed.


Of course, you can also use the [System] permission when changing users or groups so that you do not have to switch back and forth between user logon.


Method 2: run the VBS script,

The following two scripts can be executed,

Script 1:

DIM objShellset objShell=wscript.createObject("wscript.shell")iReturn=objShell.Run("cmd.exe /C D:\Files\APPService\AppReader.exe", 0, TRUE)

[D: \ Files \ APPService \ AppReader.exe] is the exe file to be executed.

To hide a window, you only need to set the second parameter of Run to 0, and set display to 1;

Script 2

Set WinScriptHost = CreateObject("WScript.Shell")WinScriptHost.Run Chr(34) & "D:\Files\APPService\AppReader.exe" & Chr(34), 0Set WinScriptHost = Nothing

 

To hide a window, you only need to set the second parameter of Run to 0, and set display to 1;

Configuration example:




Set the execution interval as needed:


Perfect solution!

There are many ways to set form hiding. This is for your reference only.

If you have a good method, please let us know.




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.