TOD
Posts: 14
Joined: Tue Dec 03, 2013 10:48 pm

Good practices?

Hi all,
Currently, our application uses 2 folders :
[Program Files] for application EXE and DLL
[Common Application Data] for the database, some files that don't change (e.g. *.dotx) and files users can access and modify.

As we encounter too many rights issues when users not have admin rights, we planned the following changes:
- Move files users can modify in a user directory, like [My Documents]
- At installation time, conditionnaly change folders during install, depending installation type ('only for me' or 'for all users') :
[Program Files] -->[Local Application Data]Programs
[Common Application Data] --> [Local Application Data]
[My Documents] --> [Public Documents]

1) Is it good practices? Or could you tell us the best practices?
2) It seems the installation type doesn't automatically change [Common Appllication Data] to [Local Application Data], so how could we do that?
3) Is there a way to test user permissions on a folder during installation to copy the files conditionnaly?


Thanks in advance for your help and your expertise.

Regards,

TOD
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Good practices?

Hello Tod,
1) Is it good practices? Or could you tell us the best practices?
In order to achieve what you want you can follow our "Make the package install per-user or per-machine" article steps.
) It seems the installation type doesn't automatically change [Common Appllication Data] to [Local Application Data], so how could we do that?
Please keep in mind this is the default behavior. You can take a look on "Installation Context" windows installer article and check the folder redirection paths. However, if you want that a file to be accessible for all users, then you can add it in a folder under "Common Application Data" directory and, using our "Permissions" support, add "Everyone -> Full Control" permissions on its parent folder from "Files and Folders" page.
3) Is there a way to test user permissions on a folder during installation to copy the files conditionnaly?
I'm afraid we don't have predefined support for this. As a workaround you can try to write your own custom action which will perform this check and will set an installer property accordingly. Then, you can use the above property to condition the component installation of the related files.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
TOD
Posts: 14
Joined: Tue Dec 03, 2013 10:48 pm

Re: Good practices?

Hello Daniel,

Thank you for your answers and clarification.
However, I have trouble understanding some points:
could you, please, tell me what is your recommendation or good practice (or Microsoft recommandation) for the location of application data (for example an Access database) that would be installed for all users?
Thank you, in advance, for your expertise.

Regards,

TOD
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Good practices?

Hello Tod,

If you want an application file to be installed for all users, then you should add it under "Common Application Data" folder from "Files and Folders" page.

Let us know if you have any question.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”