Archive: How to I force my installer to be on top of other windows?


How to I force my installer to be on top of other windows?
Does Nsis have a plugin or an easy way to do this? Thanks in advance?


You need to call SetWindowPos with the system plugin, but why do you think its a good idea to mess with the users system like that?


Sometimes it's a 'necessary evil' and not all that evil.

Take, for example, popping up a messagebox -before- the installer UI opens. If you move to another application while the installer is still launching, you will then get the messagebox, click on it, and... the installer doesn't show up, as it's technically still behind the other window.

Don't ask me how the heck that happens, but it does (Windows' handling of which application is allowed focus, and when, could use improvement). When it does, making sure the installer is on top (not at all times, just move it to the top-most z index, as it were) just after such a messagebox has been dealt with, is quite useful.

That said, I just use the built-in "BringToFront" functionality for that.

If you do want it on top at all time, I'm with Anders ;)