diff --git a/salt/modules/win_path.py b/salt/modules/win_path.py index 91e2f5e019..f6c02d4326 100644 --- a/salt/modules/win_path.py +++ b/salt/modules/win_path.py @@ -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: