Archive: NSIS bails out if installed to Program Files directory


NSIS bails out if installed to Program Files directory
Hi,

I use UserMgr plugin to create a service account user and performing some SID-related operations (find localized names of built-in groups ...). In addition, I use Simple service plugin to install a service. My installer requires to run with admin privileges. I've observed that the installer bails out if it tries to install to "Program Files" directory. Same happens both on Windows 7 and Windows 2008 R2. Everything goes fine if the destination directory is something else outside. I wonder if some built-in software protection mechanisms reacts to direct dll calls from plugins.

Has anyone experienced the same ? Any clues how to get around ?

Thanks.


What do you mean by "bails out"? Does it crash? Do you get an access violation? Does it simply exit? Does it just fail to write files?

One thing I would check is compatibility mode. If it's set in the Properties dialog, then that might cause some issues. Microsoft has some shims for handling Program Files. They have the whole virtual store thing that redirects Program Files writes to %LOCALAPPDATA%\VirtualStore.