How to Add Files to All Users\Shared Documents
Updated: 05 Sep 2010 | 7 comments
This issue has been solved. See solution.
Hi All,
I am running WPS 8 Pro. I did a capture and added a file to "C:\Documents and Settings\All Users\Shared Documents"
When I run the resulting MSI it installs the file to "C:\Documents and Settings\%Logged_On_User%\All Users\Shared Documents"
My question is how do I install the file to the correct location of "C:\Documents and Settings\All Users\Shared Documents"?
Regards
Chris Woolley
Discussion Filed Under:
Comments
ALLUSERS property
What is your ALLUSERS property set to ? If you are installing an application "per machine" and want your application shortcuts to be in the All Users profile, then you need to set the ALLUSERS property to 1.
The location of the All Users and current user profiles are extracted from the shell folder definitions in the registry, and are not "hard coded", so if you want to target the All Users profile when installing "per user" instead of "per machine", you will need to use a "Set Directory" custom action to target the required folder.
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
My ALLUSERS is set to 2 however I would like to install to "C:\Documents and Settings\All Users\Documents" regardless of the value of ALLUSERS.
When I use the "Set Directory" custom action it works if for example I set the directory value to [INSTALLDIR]Documents however it doesn't work if I set the directory value to [ALLUSERSPROFILE]Documents. What is the best way to set the value of the ALLUSERSPROFILE?
If you're using the GUI...
...start your target folder tree beneath 'Windows\Profiles\All Users'.
Also, there is a known issue where the profile folders sometimes fail to resolve. You can work around this fairly easily by pinching the rather neat CAs (e.g. SetAllUsersProfileNT) which are part of almost all InstallShield-authored MSIs and dropping them into your 'Windows Application' template.
Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using http://www.google.com before posting.
I use a CA in my execute Immediate sequence
If VersionNT >= 500 then
Set Directory ALL_USERS to [%ALLUSERSPROFILE]
End
Or if the ALL_USERS folder does not exists in your table and you don't want to create it, you could use.
Set Directory ProfilesFolder to [%ALLUSERSPROFILE]
Hmm...
...ssssssssssssort of like the response I made 20-odd hours ago, then? LOL
Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using http://www.google.com before posting.
Thanks to everyone that replied. The problem in the end was that I tried to resolve ALLUSERSPROFILE without a leading %. I tried both leading and trailing %'s, as well as none, neither of which worked. Thanks Tom.b
Solution
I have changed the "Mark as Solution" flag to Tom.b 's post
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
Would you like to reply?
Login or Register to post your comment.