I am pretty sure I need to call SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM) "Environment", SMTO_ABORTIFHUNG, 5000, &dwReturnValue);
And can't figure out how. Here is the background of what/why: I am trying to "add a dir to the windows search path." Apparently this is a two step process: 1) add dir to reg key, 2) make win notice the new value. Here is my #1. from _winreg import * ... h = OpenKeyEx( hive, key, 0, KEY_SET_VALUE ) NewPath = curPath + ';' + DirToAdd SetValueEx(h, 'path', 0, REG_EXPAND_SZ, NewPath ) CloseKey(h) I am basing my step 2 on: "... modifications to the environment variables do not result in immediate change .... To effect these changes ... broadcast a WM_SETTINGCHANGE message..." http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q104011 Carl K _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32