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

Predefined Folder for CSIDL_COMMON_DOCUMENTS

Michael,

Something I was really hoping the RTM of IS2009 would have is still missing.

There really should be a Predefined Folder for CSIDL_COMMON_DOCUMENTS.

Currently, you have to work around this via Installscript and a custom action and to set a property and then folders to that property.

It would make things a lot simpler, especially for Basic MSI projects.
Labels (1)
0 Kudos
(4) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

As Windows Installer doesn't provide one, whatever we do would have to be a lot like the custom action scenario you describe. The only savings would be that it could be more easily included in the default template project. Perhaps you could make your own template with this already included?
0 Kudos
LanceRas
Level 7

Michael... well making my own template would be too easy, which is why... lol.

But, your point on maybe making the default template have that value, may be valuable.
0 Kudos
DLee65
Level 13

Michael,

Do you have any insight why Windows Installer does not provide this value? I have always wondered this too.

Like Lance above, we have created our own custom action to set this value.
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

I don't have any official insight, but as a guess, the backwards compatibility story is complex when they add predefined directories. It's also possible they just haven't seen enough desire for it to seem worth it.

Say for instance that in MSI v.X, a directory under TARGETDIR with name CommonDocumentsFolder is just another directory, but in v.X+1 it now resolves to a useful value. People who aren't paying close attention might not realize they depend on v.X+1 in order to get their directory populated, and thus install directly to the root folder on machines running v.X or earlier.

Then if you jump the hurdle and make it work on v.X and earlier, you have to write the same code as you do now, only it's even more complex because the directory may be set legitimately. So is it worth it? It almost makes the plain custom action approach seem more solid.
0 Kudos