views:

28

answers:

2

I am trying to make an application installer, it needs to install an amount of read/writeable files to user application data.

But when i install that only happens for the user installing the project. The instalation wizard aks if the application should be installed of only the current user or everyone, how can I prevent my user selecting everyone ?

or how to add files to an installer, accessable to all users ?.

A: 

I'm not 100% clear on your question -- perhaps there are 2 questions here. I can suggest:

1 - There is a Windows Installer property CommonAppDataFolder:
http://msdn.microsoft.com/en-us/library/aa367992(v=VS.85).aspx

You could store data here that would be available to all users of the machine.

2 - The ALLUSERS property manages how applications get installed per-user or per-machine:
http://msdn.microsoft.com/en-us/library/aa367559(v=VS.85).aspx

If you set ALLUSERS in your install package, you can force per-user or per-machine.

William Leara
Beware that CommonAppDataFolder is *not* writable after install. Which I assume is the real problem here.
Hans Passant
Yup, the writability is my main consern here.In terms of the ALLUSERS, how is that settable through a set up project in visual studio ? The property InstallAllUsers is not persistant as the user can change it when installing.
Sdry
A: 

To specify mandatory per-user installation

  1. In Solution Explorer, select the deployment project.

  2. In the Properties window, select the InstallAllUsers property and set it to false.

  3. On the View menu, point to Editor, and then click User Interface.

  4. Under the Install node, select the Installation Folder node.

  5. In the Properties window, select the InstallAllUsersVisible property and set it to false.

http://msdn.microsoft.com/en-us/library/445kc47k(VS.90).aspx

Info about files shared by all users : http://stackoverflow.com/questions/76760/vs2008-setup-project-shared-by-all-users-application-data-files

Sdry