Python禁用开始菜单和任务栏 [英] Python disabling startmenu and taskbar
问题描述
我有一个 python tkinter 应用程序.每当我的应用程序运行时,我都希望我的窗口开始菜单、桌面图标和任务栏消失.
I have a python tkinter app. Whenever my app is running, i want my window startmenu, desktop icons and task bar to be disappeared.
我实际上通过手动进入 Windows 任务管理器并终止进程explorer.exe"来获得所需的结果.
I actually managed to get the required result by manually going into the windows task manager and killing the process 'explorer.exe'.
但是当我尝试编写一个 python 脚本来像这样自动执行此操作时:
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.
有什么办法可以用 python 脚本锁定(甚至隐藏)开始菜单和任务栏?
Is there any way i can lock down(or even hide) the startmenu and taskbar with the python script?
该脚本将用于
Windows XP 专业版 32 位
windows XP pro 32bit
蟒蛇 2.7.5
推荐答案
尝试将 /f
作为参数传递到那里,它应该可以工作:
Try to pass /f
as a parameter there, it should work:
os.system('taskkill /f /im explorer.exe')
是的,它奏效了.自己测试过..
Yap, it worked. Tested it myself..
参考:http://technet.microsoft.com/en-us/图书馆/bb491009.aspx
希望这会有所帮助!
这篇关于Python禁用开始菜单和任务栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!