title: Is there a way to set the environment path programmatically in C++ on Windows?
body: <p>Is there a way to set the global windows path environment variable programmatically (C++)?<br><br>
  As far as I can see, putenv sets it only for the current application.<br>
  Changing directly in the registry <code>(HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment)</code> is also an option though I would prefer API methods if there are?</p>