If restart is not an option, you can try to kill every instance of explorer.exe, but i think this will also be not acceptable.
The correct way of doing it is sending a message to all top most windows to notificate of changes in the environment. But i don't know anything in the OS to do that. If you can include an exe and have access to a c compiler, this should do the trick
#include "windows.h"
void main(void) {
SendMessageTimeout(
HWND_BROADCAST,
WM_SETTINGCHANGE,
(WPARAM) NULL,
(LPARAM) "Environment",
SMTO_NORMAL,
1000,
NULL
);
}
I've tried compiling it with mingw/gcc in Windows 7 64 and seems to work without problems.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…