Windows Task Scheduler hides several ways to execute windows

Source: Internet
Author: User

Description: "Task Plan", sometimes called as "scheduled Tasks", everyone is accustomed to call Windows Scheduled tasks, in fact, people really called "mission plan": see, there is a picture of the truth


Before doing the project, encountered this is not the problem of the problem, do not hide the implementation of the interface "small black Window", the program will be carried out, but if someone at the same time in the operation of this computer, accidentally, the execution of the small black window closed, then there is a problem, especially in the production environment,

So try a few ways to solve this problem:

Method 1: Log in with a different account

For example, the currently logged in user is administrator, you can create a new user "Jack", in "change user or group" when the user,

Log in without this user login, each execution will not appear "small black Window", note: This time, the following must be selected "regardless of whether the user is logged in to run",

Otherwise, this task is not scheduled to execute


Method 2: Use the VBS script to execute,

The following two scripts can be executed,

Script 1:

</pre><pre name= "code" class= "VB" >dim objshellset objshell=wscript.createobject ("Wscript.Shell") Ireturn=objshell.run ("cmd.exe/c D:\LogFiles\APPService\AppServer.exe", 0, TRUE)
"D:\LogFiles\APPService\AppServer.exe"EXE file to be executed
The hidden window only needs to set the second parameter of run to 0, the display is set to 1;


Script 2

Set Winscripthost = CreateObject ("Wscript.Shell") Winscripthost.run Chr & "<pre name=" code "class=" VB ">d : \logfiles\appservice\appserver.exe<span style= "font-family:arial;" > "& Chr (0</span>),
Set Winscripthost = Nothing


The hidden window only needs to set the second parameter of run to 0, the display is set to 1;

Configuration such as:




Set the time interval for execution as needed:


Perfect solution!

There are a number of ways to set the form to hide, which is for your reference only.

If there is a good way, please let us know.




Windows Task Scheduler hides several ways to execute windows

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.