问题
I have a python tkinter app. Whenever my app is running, i want my window startmenu, desktop icons and task bar to be disappeared.
I actually managed to get the required result by manually going into the windows task manager and killing the process 'explorer.exe'.
But when i tried to write a python script to do that automatically like this:
import os
os.system("taskkill /im explorer.exe")
It is actually bringing up the shutting down window instead of hiding the startmenu and taskbar.
Is there any way i can lock down(or even hide) the startmenu and taskbar with the python script?
EDIT: The script will be used on
windows XP pro 32bit
python 2.7.5
回答1:
Try to pass /f
as a parameter there, it should work:
os.system('taskkill /f /im explorer.exe')
Edit: Yap, it worked. Tested it myself..
Reference: http://technet.microsoft.com/en-us/library/bb491009.aspx
Hope this helps!
来源:https://stackoverflow.com/questions/17694159/python-disabling-startmenu-and-taskbar