Python Custom Windows boot entry

Source: Internet
Author: User

Recently found that the computer boot speed more and more slowly. Ready to write a startup applet with Python:

1: Wait for 12s wait for network connection after power on, after judging the network, if still is not connected, abandon boot start Project.

1: Determine the date of the boot, if it is the week of 6th when you do not have to open the work of the program.

startup.py

===============================

Import Os,time,datetime


# What's it today?


Weekday=int (Time.strftime ("%w"))


#start Essentialpim


Os.system (' start/b @ping 127.0.0.1-n 12-w 1000 ')


A=os.system (' @ping www.baidu.com-n 2-w 1000 ')


If a = = 0:

Os.system (' @ping 127.0.0.1-n 10-w > nul ')

Os.system (' Start ' "" C:\Program Files (x86) \tencent\qq\qqprotect\bin\qqprotect.exe ")

Os.system (' @ping 127.0.0.1-n 3-w > nul ')

Os.system (' Start ' "" C:\Users\Administrator\AppData\Local\Google\Chrome\Application\chrome.exe "')



# start Foxmail if is not weekend


if (Weekday < 6):

Os.system (' @ping 127.0.0.1-n 3-w > nul ')

Os.system (' Start ' "" D:\software\RTXC\RTX.exe "')

Os.system (' @ping 127.0.0.1-n 3-w > nul ')

Os.system (' Start ' "" D:\Program files\foxmail 7.0\foxmail.exe ")

Os.system (' @ping 127.0.0.1-n 3-w > nul ')

Os.system (' Start ' "" D:\software\EditPlus3\EditPlus 3\editplus.exe ")

Os.system (' @ping 127.0.0.1-n 3-w > nul ')

Os.system (' Start ' "" D:\Program Files (x86) \cisco Systems\vpn client\vpngui.exe "')

Os.system (' @ping 127.0.0.1-n 3-w > nul ')

Os.system (' Start ' "" E:\masa\SecureCRT\SecureCRT.exe "')



Os.system (' exit 0 ')

==========================

Boot Start Win_startup.bat

Start/b D:\Python26\python.exe D:\startup.py

This article is from the Linux system maintenance blog, so be sure to keep this source http://linuxadmin.blog.51cto.com/2683824/1561689

Python Custom Windows boot entry

Related Article

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.