Fixed problem with add/remove path

This commit is contained in:
twangboy 2015-09-15 15:36:51 -06:00
parent f5c3f157dd
commit d4c8e30f5d

View File

@ -72,7 +72,7 @@ def get_path():
salt '*' win_path.get_path
'''
ret = __salt__['reg.read_key']('HKEY_LOCAL_MACHINE',
ret = __salt__['reg.read_value']('HKEY_LOCAL_MACHINE',
'SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment',
'PATH')
if isinstance(ret, dict):
@ -149,8 +149,8 @@ def add(path, index=0):
regedit = __salt__['reg.set_value'](
'HKEY_LOCAL_MACHINE',
'SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment',
';'.join(sysPath),
'PATH',
';'.join(sysPath),
'REG_EXPAND_SZ'
)
@ -186,8 +186,8 @@ def remove(path):
regedit = __salt__['reg.set_value'](
'HKEY_LOCAL_MACHINE',
'SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment',
';'.join(sysPath),
'PATH',
';'.join(sysPath),
'REG_EXPAND_SZ'
)
if regedit: