Discussion:
Namespace extension install without reboot
(too old to reply)
tsrich
2011-11-16 19:33:04 UTC
Permalink
I have an namespace extension and would like to install it without requiring a reboot.

However, on Windows 7 systems where Windows Explorer is set to start all folders under the same process, my namespace does not appear in explorer windows till the desktop explorer.exe is restarted. If I launch a new explorer process (using winexec), the namespace shows up. If the Windows Explorer setting is changed to start new folders in another process (prior to the install), then everything works fine.

The code is notifying the shell of the new namespace using:
SHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pidl);
SHChangeNotify(SHCNE_UPDATEDIR, SHCNF_IDLIST, pidl, 0);

I've tried various other combinations and none had an affect.

Does anyone have any idea how to make this work? I'd rather not force a reboot after the install.
bviksoe
2011-11-18 09:31:10 UTC
Permalink
Post by tsrich
I have an namespace extension and would like to install it without requiring a reboot.
However, on Windows 7 systems where Windows Explorer is set to start all folders under the same process, my namespace does not appear in explorer windows till the desktop explorer.exe is restarted.  If I launch a new explorer process (using winexec), the namespace shows up.  If the Windows Explorer setting is changed to start new folders in another process (prior to the install), then everything works fine.
   SHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pidl);
   SHChangeNotify(SHCNE_UPDATEDIR, SHCNF_IDLIST, pidl, 0);
I've tried various other combinations and none had an affect.
Does anyone have any idea how to make this work?  I'd rather not force a reboot after the install.
I usually have some success with
SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL);

bjarke
Leo Davidson
2011-11-18 12:01:10 UTC
Permalink
Post by tsrich
I have an namespace extension and would like to install it without requiring a reboot.
If the other (potentially better) suggestion doesn't work, you can ask
newer versions of Windows to restart Explorer (without hacks like
killing the process or anything like that). There's some code to do
that in my little Clear Icon Cache tool, here:

http://www.pretentiousname.com/miscsoft/index.html#ClearIconCache

(There's nothing special about that tool or my code; it's just easy
for me to remember since I wrote it. :))

Loading...