Batch +vbs+ Registry implementation boot automatically start EXE program

Source: Internet
Author: User

Batch +vbs+ registry Implementation Windows boot automatically start EXE program

The following are all Windows-based systems.

We all know that when we think of a program running automatically at boot time, there are only three ways:

1, make the service, and then configure the service to start automatically ( can be achieved without user login to complete );

2, to make the driver, with the system start ( can be achieved without user login to complete );

3, make EXE program, add to boot start item ( must be completed in the case of user login ).

And what I'm going to do now is a third case.

I have a want to boot automatically start EXE requirements, and for some reason this exe can not be made in short time service, so online find the next method, Kung Fu, success, the following is the idea:

1. Configure default user, Default user password

1 "Let XP boot Automatic login system" so set up the registry can ah ~ 2 You can also set the registry by using batch processing. 3 reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon"/f/v autoadminlogon/d 14 reg A DD "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon"/f/v defaultusername/d user name 5 reg ADD "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon"/f/v defaultpassword/d password 67 The above user name password corresponds to your user name password

2, the use of batch processing runexe.bat instead of EXE, users need to enter the password

1 @echo off 2 echo ############################3echo #                          #4echo #         input character test     #5echo #                          #6echo ############################7 @ set /P string=8 @Pause

3. Use the VBS script Start.vbs to start, and impersonate the user to enter the password, then wait 3 seconds, close the window

1‘-----function: Automatic input digital open service2Set Ws=createobject ("Wscript.Shell")3 4Ws.run"cmd/c Runexe.bat"5Wscript.Sleep 3006Ws.sendkeys"Input Password"7Ws.sendkeys"+{enter}"8 ' Wait 3 seconds9Wscript.Sleep 3000Ten ' Close the window OneWs.sendkeys"%Q"

4. Add Start.vbs to the startup item, such as:

5, restart the computer, waiting to see the results

This is the console window in the process of the result:

Perfect, Good luck!

Batch +vbs+ Registry implementation boot automatically start EXE program

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.