I am trying to make an installer for a program and my workplace doesn't allow us 'regular' users to modify the system environment. In an effort to get around the restrictions, I'm trying to add my program's .exe to the User PATH variable instead of the system path. Since this is in an installer, it basically will need to be done via command line prompts.
I have been looking around and found the 'SETX' command a while ago, and while it does indeed modify the user's PATH, it also includes the entire system path. For example:
setx PATH "C:\MyStuff;%PATH%"
user PATH = C:\MyStuff;[The entire system PATH];[What was in the user path before]
While this technically fulfills my requirement, I feel like this is very poor practice to make the user's path massive and redundant with the system path.
So here's my question:
Using command line prompts, how can I modify only the user's PATH variable?
Thanks in advance!
EDIT: Appears to be a duplicate of Prevent Windows System %PATH% from being prepended to user %PATH?