- UID
- 73950
- 帖子
- 297
- 积分
- 13492
- 阅读权限
- 70
- 注册时间
- 2007-11-12
- 最后登录
- 2015-4-30
- 在线时间
- 2720 小时
|
import os
if os.sys.getwindowsversion()[0] < 6 :
startSC()
exit()
os.system('taskkill /f /IM explorer.exe')
f = os.popen(r'reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Blizzard Entertainment\Starcraft" /v installpath')
for i in range(2): f.readline()
scPath = f.readline()
if scPath != "":
scPath = scPath.split(" ")[-1].strip()
f.close()
def startSC():
os.system('"'+scPath+os.sep+'starcraft.exe'+'"')
def killSC():
os.system('taskkill /f /IM starcraft.exe')
def startEx():
os.system('explorer')
#python
import time
def killR32(t):
time.sleep(t)
os.system('taskkill /f /IM rundll32.exe')
import thread
thread.start_new_thread(startSC,())
time.sleep(1)
killSC()
thread.start_new_thread(killR32,(1,))
startSC()
thread.start_new_thread(startEx,())
time.sleep(1) |
|