Archive: MUI install to Application Data and Program files


MUI install to Application Data and Program files
Hi there, I am trying to create a very simple/standard install/uninstall of the MUI that will place the appropriate files in both the windows users Application Data directory and the Program files directory.

I looked through the samples and tutorials and many forum posts but putting all together is more than I can handle at this point.

Should I place all my source files in a single directory or in the appropriate target sub directory structure?

How do I specify the 2 different target directories ((1) Application Data for the logged in user and (2) Program Files)?

Do I have to store anything in the registry?

I suppose I will eventually have to account for Vista variations also but I will be happy with the basic structure for XP for now.



Section
SetOutPath "$programfiles\MyAppName"
File /r somepath\*

SetOutPath "$appdata\MyAppName"
File foo*.bar
SectionEnd


But doing this is not a good idea, and will not work on Vista. If you install something in $programfiles, you are doing a all users install and you should probably not write to $appdata, its better if your application generates this data the first time it is executed for each user (or store it in $programfiles\MyAppName\AppData during install and have your app copy it out of there for each user)

Thanks for your quick response!

I do want to store the application in the logged in users Application Data folder. Is there a constant that will get their name so I cant put the data into that specific users folder?

And pardon my ignorance but isn't storing .exe files in the Program Files directory the standard way that installers work?

Is there a way to check for XP vs. Vista and place the files in the correct locations?


Ok..I found the $APPDATA constant and the SetShellVarContext command.

Any other comments are appreciated.