How to set windows system path using Qt api
-
no, there are not
you can change the path of your app by using putenv.
The system environment isv stored in the registry and from there given to each top most process. From there on, you have no chance from outside to change it, only from inside of the process. -
Well, this is not how environments work.
There is one inital system environment (stored in the registry on Windows) which is passed to each created process by the kernel. If a process now spawns another process (which is true for the majority of the processes, userland processes are not spawn by the kernel, but for example by Explorer.exe instead) the environment is passed to the spawned process. This means that a process can always alter its own environment (which gets passed to processes it spawns).
If you want to change the environment for other processes you will have to change the system environment and restart all processes (log off and log on on Windows).
In fact Windows provides another method by broadcasting WM_SETTINGCHANGE which enables applications aware of that message to re-initialize their environment (which should be true for at least the Windows Explorer, Program Manager and Task Manager).