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