Archive: Installation Rules for Windows XP/Vista/7


Installation Rules for Windows XP/Vista/7
Hi there.

I have a few questions regarding installation rules/assumptions with Windows XP/Vista/7. We have a software application that's used in the corporate world.

Our software is 10+ years old - and unfortunately, it still breaks some of the rules - this is becoming more of a problem in a corporate environment.

Here are some examples:

1) Our product defaults to install in the ROOT directory. ie: C:\OurProduct - easily fixed.

2) We store application configuration data inside C:\OurProduct. These are application settings - not user settings.

3) Database files for our product are stored in C:\OurProduct\Data

I recently did away with our old installer, and upgraded to NSIS (which I love - thanks for all your hard work). But I'd like to do-away with some of our past-sins and get this installing the way most-applications do with Windows.

Do you know of a resource that gives the "guidelines" or rules for installers?

What do you recommend for #2 and #3 above? We'd prefer not to use the registry for #2, and would like to NOT have these data files/settings associated with the user, but the PC. Is there such a folder?

Any tips would be appreciated.

Cheers.
M.


Variables
Look at the .chm and search for "Variables". There is a page with various variables to use.

1) Use $PROGRAMFILES, $PROGRAMFILES32, or $PROGRAMFILES64

2) Use $APPDATA

3) I would either use APPDATA or store the database stuff relative to the install ($INSTDIR)


Question about #2 - %APPDATA% - isn't this tied to the user that's logged into the machine? Is there a writable path that all users have access to, similar to this?


SetShellVarContext changes some of the variables


Anders has the ticket! Just add the following to the script prior to using $APPDATA:
SetShellVarContext all