The System.SetEnvironmentVariable call manipulates the system registry key that holds the persisted environment. A call using GetEnvironmentVariable with the same parameters should show that it has been set in the persisted registry. However, your check is to launch a new process. New processes inherit their environment from the parent process which in the case of launching a command prompt from the desktop is Explorer. Explorer needs to be told the environment has changed. The system dialog that changes the environment broadcasts a WM_SETTINGCHANGE message to do this. Then Explorer re-reads the persisted registry key and new processes will start with the new environment variable values.
You may need to broadcast a WM_SETTINGCHANGE message to notify processes of the change. When I try your example in PowerShell however (as Administrator) it does work. So the broadcast window message should be being done for you already.