Fix issue #27
Several popen_program() calls were not inside try blocks causing full crashes
This commit is contained in:
parent
18c535dcfd
commit
79d2af6e0a
3 changed files with 22 additions and 6 deletions
|
|
@ -268,5 +268,15 @@ def install_vcredists():
|
|||
|
||||
os.chdir(prev_dir)
|
||||
|
||||
# Misc
|
||||
def open_device_manager():
|
||||
popen_program(['mmc', 'devmgmt.msc'])
|
||||
|
||||
def open_windows_activation():
|
||||
popen_program(['slui'])
|
||||
|
||||
def open_windows_updates():
|
||||
popen_program(['control', '/name', 'Microsoft.WindowsUpdate'])
|
||||
|
||||
if __name__ == '__main__':
|
||||
print("This file is not meant to be called directly.")
|
||||
|
|
|
|||
|
|
@ -81,13 +81,18 @@ if __name__ == '__main__':
|
|||
function=show_installed_ram, ns='Unknown', silent_function=False)
|
||||
|
||||
# Play audio, show devices, open Windows updates, and open Activation
|
||||
popen_program(['mmc', 'devmgmt.msc'])
|
||||
run_hwinfo_sensors()
|
||||
popen_program(['control', '/name', 'Microsoft.WindowsUpdate'])
|
||||
try_and_print(message='Opening Device Manager...',
|
||||
function=open_device_manager, cs='Started')
|
||||
try_and_print(message='Opening HWiNFO (Sensors)...',
|
||||
function=run_hwinfo_sensors, cs='Started')
|
||||
try_and_print(message='Opening Windows Updates...',
|
||||
function=open_windows_updates, cs='Started')
|
||||
if not windows_is_activated():
|
||||
popen_program('slui')
|
||||
try_and_print(message='Opening Windows Activation...',
|
||||
function=open_windows_activation, cs='Started')
|
||||
sleep(3)
|
||||
run_xmplay()
|
||||
try_and_print(message='Running XMPlay...',
|
||||
function=run_xmplay, cs='Started')
|
||||
|
||||
# Done
|
||||
print_standard('\nDone.')
|
||||
|
|
|
|||
|
|
@ -43,7 +43,8 @@ if __name__ == '__main__':
|
|||
umount_backup_shares()
|
||||
|
||||
# Done
|
||||
run_kvrt()
|
||||
try_and_print(message='Running KVRT...',
|
||||
function=run_kvrt, cs='Started')
|
||||
print_standard('\nDone.')
|
||||
pause("Press Enter to exit...")
|
||||
exit_script()
|
||||
|
|
|
|||
Loading…
Reference in a new issue