A Simple Method for running and starting the console program in the background

Source: Internet
Author: User

After writing a console program, you want to run it in the background and start it on your own. There is a simple method as follows.
1. running in the background
A simple. vbs file. The implementation method is as follows:
For example, my. exefile is hkserver.exe. You can use text documents to write the following code:
[Vb]
Set wscriptObj = CreateObject ("Wscript. Shell ")
WscriptObj. run "C: \ Users \ HK \ Desktop \ HKServerEditVersion2.4 \ Debug \ HKServer.exe", 0
Save the file as a. vbs file and directly run the. vbs file to run the file in the background.
If it is written:
[Vb]
"HKServer.exe"
The. vbs and. EXE files are in the same directory.
2. Auto Start
Method 1): copy the. vbs file to the Startup Folder.
Method 2): Create a. vbs file shortcut to start --> all programs --> Start folder.
Once the computer is started, the hkserver.exe file can be started automatically.

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.