0

I have a requirement where in which,

Lets say

  1. Am logging with a user called AAA to my windows machine and execute below command SETX home %UserProfile%

This will set home= C:\Users\AAAand same we can see in env variables.

  1. I will logout and log in with user BBB if i make echo %home%, this user will not have home env, i wish to get home=C:\Users\BBB here also without using SETXagain.

Please suggest me the solution, How to set one user variable that should persist across any user he login to machine.

Note: It should not be system variable.

Please share your thoughts.

Sreedhar GS
  • 2,694
  • 1
  • 24
  • 26

1 Answers1

2

Whitout being a system (machine) variable, the environment variable is a per user setting (store in HKCU in the registry), it won't be accessible by another user.

Loïc MICHEL
  • 24,935
  • 9
  • 74
  • 103