PDA

Click to See Complete Forum and Search --> : Inno - Normal user install into [Program Files] folder


IanS
Jun 23rd, 2010, 09:40 AM
I've used Inno for years and always use this line in the Setup section of all of my Inno scripts.

PrivilegesRequired=Admin

It's mainly business software where the company have computer/software managers who don't want their users installing software without Admin permission.

Because of that I don't have any experience deploying to 'normal' users.

If I remove that line and install with 'normal' privileges how does the setup actually install anything into the Programs Files folder ? I mean doesn't UAC on Vista and Win7 prevent anything being written to the Program Files folder?

Or does the install simply create/install automatically for that user without problems ?

dilettante
Jun 23rd, 2010, 12:03 PM
If you're careful to circumvent legacy installer detection heuristics the application may be installed into a virtualized "Program Files" and if the planets align correctly you'll have virtualized per-user component registation as well. Ugly but it might work.

This isn't how per-user installation is supposed to be done, but doing per-user installs wasn't fully blessed until Installer 5.0 as I recall, i.e. until Windows 7. There were ways developed to make it fly as far back as Win2K though. As far as I know it always happens under Windows Installer. I'm not sure most scripted installers know how to do it, since most of them rely on calling libraries' self-reg entrypoints for registration.

The cleanest way is to use reg-free COM and bypass all of that. Beginning in Windows 7 there is an alternative folder for doing per-user installs (i.e. not Program Files). It works prior to Win7 too, but your installer needs to create the proper folder first.