Archive: Logoff instead of Restart


Logoff instead of Restart
Hi,

I'm using a shell extension for right click menu integration, so when I'm doing an update install it is possible that the shell extension dll is still loaded by the explorer.

But that's no problem because I'm using a customized version of Joost's UpgradeDLL macro (and essentially the /REBOOTOK paramater).

This way the installation works as intended. The drawback is to have a full restart, whichs means downtime for a server.

In my case a simple logoff is enough to unload the dll (if you logoff the explorer is shuting down and with it my shell extension). So my question is: Is there something like a /LOGOFFOK paramter, that does in principle the same as /REBOOTOK but uses just a logoff instead of a restart.

I'm using NSIS 2.0 final.

Thanks in advance...


You can replace the Reboot call in MUI.nsh with:

System::Call "user32::ExitWindows(0, 0)"

BTW, logging off might not be enough if another user is also logged on.


Originally posted by kichik
BTW, logging off might not be enough if another user is also logged on.
Ah, you are right. I forgot that possibility.

Nevertheless thank you for the solution...