Updated SafeMode Enter & Exit scripts

This commit is contained in:
Alan Mason 2017-11-22 21:02:36 -08:00
parent 98b95cbcb5
commit e711258850
2 changed files with 31 additions and 27 deletions

View file

@ -17,7 +17,9 @@ if __name__ == '__main__':
try:
os.system('cls')
print_info('{}: SafeMode Tool\n'.format(KIT_NAME_FULL))
if ask('Enable booting to SafeMode (with Networking)?'):
if not ask('Enable booting to SafeMode (with Networking)?'):
abort()
# Edit BCD to set safeboot as default
cmd = ['bcdedit', '/set', '{default}', 'safeboot', 'network']
run_program(cmd, check=False)

View file

@ -17,7 +17,9 @@ if __name__ == '__main__':
try:
os.system('cls')
print_info('{}: SafeMode Tool\n'.format(KIT_NAME_FULL))
if ask('Disable booting to SafeMode?'):
if not ask('Disable booting to SafeMode?'):
abort()
# Edit BCD to remove safeboot value
for boot in ['{current}', '{default}']:
cmd = ['bcdedit', '/deletevalue', boot, 'safeboot']