Updated SafeMode Enter & Exit scripts
This commit is contained in:
parent
98b95cbcb5
commit
e711258850
2 changed files with 31 additions and 27 deletions
|
|
@ -17,7 +17,9 @@ if __name__ == '__main__':
|
||||||
try:
|
try:
|
||||||
os.system('cls')
|
os.system('cls')
|
||||||
print_info('{}: SafeMode Tool\n'.format(KIT_NAME_FULL))
|
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
|
# Edit BCD to set safeboot as default
|
||||||
cmd = ['bcdedit', '/set', '{default}', 'safeboot', 'network']
|
cmd = ['bcdedit', '/set', '{default}', 'safeboot', 'network']
|
||||||
run_program(cmd, check=False)
|
run_program(cmd, check=False)
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,9 @@ if __name__ == '__main__':
|
||||||
try:
|
try:
|
||||||
os.system('cls')
|
os.system('cls')
|
||||||
print_info('{}: SafeMode Tool\n'.format(KIT_NAME_FULL))
|
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
|
# Edit BCD to remove safeboot value
|
||||||
for boot in ['{current}', '{default}']:
|
for boot in ['{current}', '{default}']:
|
||||||
cmd = ['bcdedit', '/deletevalue', boot, 'safeboot']
|
cmd = ['bcdedit', '/deletevalue', boot, 'safeboot']
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue