(this is an english rewrite of the popular german article “Zusätzliche Special Folders”. However it includes some new findings regarding this topic)
The windows installer technology provides the most frequent needed special folder directory properties out of the box.
However sometimes you need to reference a directory which isnt directly supported (yet).
The following VBScript uses the “Shell.Application” object to get the actual path of the requested special folder. (in our example for “CSIDL_COMMON_DOCUMENTS”)
Insert this action as ““Call VBScript From Embedded Code” Action directly after “CostInitialize” in both “User Interface” and “Execute Immediate”.
Const CSIDL_COMMON_DOCUMENTS = &h2e
Set objShell = CreateObject(“Shell.Application”)
Session.Property(“ONTX_COMMON_DOCUMENTS”) = objShell.Namespace(CSIDL_COMMON_DOCUMENTS).Self.Path
Set objShell = nothing
Afterwards, insert the following line into the directory table:
Bear in mind to add all those properties into the “SecureCustomProperties” Property.
You may use then this property as any other known directory property (eg. SystemFolder, ProgramFilesFolder)
By following the link at the end of the article you will get all known CSIDL’s which can be used for this script.