You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
520 B
13 lines
520 B
import ctypes
|
|
import os
|
|
def is_admin():
|
|
return ctypes.windll.shell32.IsUserAnAdmin() != 0
|
|
exe_path = os.path.expandvars(r"%userprofile%\portables"
|
|
r"\foldertimeupdate"
|
|
r"\FolderTimeUpdate.exe"
|
|
)
|
|
def update(*starts,force_admin = True):
|
|
if not is_admin() and force_admin:
|
|
raise Exception("Process must be admin")
|
|
for start in starts:
|
|
subprocess.check_call([exe_path,'/stext','null','/BaseFolder',start])
|