24 lines
776 B
Python
24 lines
776 B
Python
"""WizardKit: Launch Snappy Driver Installer Origin"""
|
|
# vim: sts=2 sw=2 ts=2
|
|
|
|
import wk
|
|
|
|
|
|
# Functions
|
|
if __name__ == '__main__':
|
|
wk.ui.cli.set_title(
|
|
f'{wk.cfg.main.KIT_NAME_FULL}: Snappy Driver Installer Origin Launcher',
|
|
)
|
|
log_dir = wk.log.format_log_path(tool=True).parent
|
|
|
|
# Windows 11 workaround
|
|
if wk.os.win.OS_VERSION == 11:
|
|
appid_services = ['appid', 'appidsvc', 'applockerfltr']
|
|
for svc in appid_services:
|
|
wk.os.win.stop_service(svc)
|
|
if any([wk.os.win.get_service_status(s) != 'stopped' for s in appid_services]):
|
|
raise wk.std.GenericWarning('Failed to stop AppID services')
|
|
|
|
sdio_path = wk.kit.tools.get_sdio_path(interactive=True)
|
|
cmd = [sdio_path, '-log_dir', log_dir]
|
|
wk.exe.popen_program(cmd, cwd=sdio_path.parent)
|