I have read this solution but they all fall into the case of the path which is not my case.
Overcoming the 1024 character limit with setx Basically I created and want to use my environment variable, let's call it MY_VAR which will be quite a long string (for example a credential) When defining this over the web ui in windows it works just fine. But I would like to automate this and do this from the command line. I was exploring the setx and even by using a file for example:
setx MY_VAR /f my_file.txt /a 0,1
WARNING: The length of the extracted value is truncated to 1024 characters.
Extracted value: .... value is correctly displayed.
SUCCESS: Specified value was saved.
I still get said warning even if the extracted value is correct but when I access the variable over "set" I still see it truncated to the 1024 chars.
Is there a way to go around this? Because I can do it from the UI for sure there must be a way to do this from the command line no?
Thanks for any feedback, I know that the question is pretty similar to the one I just linked but honestly all the solutions I see there are very focused on the path but that is not my problem I really just want to define a value that is longer than 1024. I did not explore the part about the registry because honestly I don't know how that works.