Video Screencast Help
Search Video Help Close Back
to help
Not able to make it to Vision this year? Get a sampling in the Best of Vision on Demand group.

How to Add Files to All Users\Shared Documents

Updated: 05 Sep 2010 | 7 comments
Chris Woolley's picture
0 0 Votes
Login to vote
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

Comments

EdT's picture
03
Aug
2010
1 Vote +1
Login to vote

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.

Chris Woolley's picture
04
Aug
2010
0 Votes 0
Login to vote

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?

VBScab's picture
03
Aug
2010
1 Vote +1
Login to vote

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.

Tom.b's picture
04
Aug
2010
1 Vote +1
Login to vote

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]

VBScab's picture
04
Aug
2010
0 Votes 0
Login to vote

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.

Chris Woolley's picture
04
Aug
2010
0 Votes 0
Login to vote

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

EdT's picture
05
Aug
2010
0 Votes 0
Login to vote

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.