Add Windows\Temp permissions fix

This commit is contained in:
2Shirt 2019-11-16 17:11:52 -07:00
parent b1739b02a0
commit d69b0051e1
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
2 changed files with 12 additions and 0 deletions

View file

@ -463,6 +463,17 @@ def drive_is_rotational(drive):
return is_rotational
def fix_windows_temp_dir():
"""TODO"""
user_perms = [
'Users:(CI)(X,WD,AD)',
'Administrators:(OI)(CI)(F)',
]
for u_p in user_perms:
cmd = ['icacls', r'C:\Windows\Temp', '/grant:r', u_p, '/T']
run_program(cmd)
def open_device_manager():
popen_program(['mmc', 'devmgmt.msc'])

View file

@ -91,6 +91,7 @@ SETUP_ACTIONS = OrderedDict({
'Restart Explorer': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': restart_explorer,},
'Power Plans': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': config_power_plans, 'KWArgs': {'name': 'Balanced'},},
'Update Clock': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': update_clock,},
'Windows\\Temp Fix': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': fix_windows_temp_dir,},
# Cleanup
'Cleaning up': {'Info': True},