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

Dynamic Registry Entry / Folders

With multi user environments, how do you go about having dynamic directory paths in your registry and creating folders based on the user.

Eample Registry:

Key: DefaultDir
Value: C:\Users\Bob.HomePC\Documents\NewApplciation

The Documents Folder is not a static path, but is off of the current user.

How do you actully create that folder and put sample files into it?

Thanks in adavance

JJ
Labels (1)
0 Kudos
1 Reply
Ajay_Ladsaria
Level 7

Hi JJ,

You will want to rely on Windows Installer system folder properties:
http://msdn.microsoft.com/en-us/library/aa370905(v=VS.85).aspx#system_folder_properties

For example, you can use the predefined folder location PersonalFolder, or PersonalFolder property to refer to the current user's Documents folder.

You can also reference environment variables in a MSI package if necessary:
[%environmentvariable]

Reference:
Formatted
http://msdn.microsoft.com/en-us/library/aa368609(v=VS.85).aspx

-Ajay
0 Kudos