cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to: Install files in My Documents

Hi,

I need to deploy an MSI that would copy files under the My Documents folder. I need the MSI to execute for each user connecting to the computer, like when you start MS Office applications the first time.

Can anyone tell me how to do this please ?

I added the files in PersonalFolder. It adds the files for the user installing the MSI, but not for other users logging on the computer.

Thanks in advance.

Kind regards,
(3) Replies
This is not an uncommon problem. The key here is in how Keypaths are treated in windows installer. If you install files to [PersonalFolder] you end up registering the keypath to something like:

c:\Documents and Settings\User\My Documents\

Which is a valid path still when you switch user accounts, so it doesn't trigger autorepair when another user runs the Advertised Shortcut.

So, to get around this, for each component installed to this folder, create a Keypath in the Registry under HKCU somewhere--this will change with each new user profile, and trigger autorepair.

Hope this helps.
Thanks for the answer. I will try the HKCU tip.
However, I don't know if it will work. Let me explain ...

The problem here is that it concerns files that are used by a Word "templates" application we have developed internally. The files in MyDocs contain user preferences, "personal address book", ...

How can I trigger the autorepair ? I doubt that launching Word will do the trick ?

Thanks in advance.
Launching word might do the trick, if you are using COM Extraction on any COM libraries so that you get entries in the Class or ProgId tables.

Both of these are entrypoints into AutoRepair, so this might work for you if you are using self-registering files.