Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Copying files so that they appear in 'Documents' for all users on the local machine
 

Copying files so that they appear in 'Documents' for all users on the local machine

Hi There,

Im developing an installer using WiX but I think my question is more general to the Windows file structure. From a administrator intallation I need to copy certain files so that they appear in the My Documents / Documents (C:\Users\All Users various names\Documents) folder for all of the various users on the local machine.

At the moment I can copy files to the folder C:\Documents and Settings\All Users\Documents, however they do not appear in each users Documents folder, have I miss understood the purpose of this folder? I thought placing files here would make them appear in each users Documents folder - much like C:\Documents and Settings\All Users\Desktop adds the files to each users desktop.

As I say, have I miss understood the purpose of this folder? are there any alternatives or does anyone have any ideas?

All help would be very much appreciated
Thanks in advance
spongeno1  Tuesday, July 07, 2009 2:29 PM

The install won't copy files into every user's version of that folder. The way it works (and I think Office used to install user-specific files like this) is that it copies the file(s) to the current user's version of that folder. If another user logs in and uses a shortcut, thena repair kicks in and installs the file for that user. I assume itbehaves like this so it works for users who don't actually exist yet. This mechanism requires that file be the KeyPath of its component.


Phil Wilson
PhilWilson  Tuesday, July 07, 2009 6:25 PM

The install won't copy files into every user's version of that folder. The way it works (and I think Office used to install user-specific files like this) is that it copies the file(s) to the current user's version of that folder. If another user logs in and uses a shortcut, thena repair kicks in and installs the file for that user. I assume itbehaves like this so it works for users who don't actually exist yet. This mechanism requires that file be the KeyPath of its component.


Phil Wilson
PhilWilson  Tuesday, July 07, 2009 6:25 PM

Hi spongeno1,

Please read the document below to get more information about the differences between Per-Machine Installation and Per-User Installation:

http://msdn.microsoft.com/en-us/library/dd765197(VS.85).aspx

Best regards,
Aland Li


Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
Aland Li  Thursday, July 09, 2009 6:42 AM

You can use google to search for other answers

Custom Search

More Threads

• Conditional installation with ClickOnce
• Click Once Uninstall Older Version
• Registry Condition
• Deployment project registry macros ?
• Has publishing changed in 2008? There's a now an Application Files Folder
• InvalidDeploymentException: Application identity does not match the application already installed
• Create a folder with a certain name
• .pfx certificate information
• Can't install my application
• How can I use the msiexec.