Is there a MSI property I can use to get the path of the All Users
Shared Documents folder?
(C:\Documents and Settings\All Users\Shared Documents\")
Under it, I need to create a folder named "Shared XXXProduct_Name" and
create other folders and install files.
If not, considering that the strings "Documents and Settings" and "All
Users" and "Shared Documents" will be different on different machines
depending of the language (French, German, Spanish…) is there a way to
pull this path from the registry using a custom action or...?
CommonFilesFolder Property
The installer sets the CommonFilesFolder property to the full path to
the Common Files folder for the current user.
But what about for ALL USERS Shared Documents?
Any help will be very welcomed.
I read the help topic "System Folder Properties" (Windows Installer
Version 2.0 Platform SDK Release: November 2001) but I was not able to
find such property.
Here are some of the properties I already used (ALLUSERS is set to 1):
ProgramMenuFolder property
The installer sets the ProgramMenuFolder property to the full path to
the Program Menu folder for the current user. If an "All Users"
profile exists and the ALLUSERS property is set, then this property is
set to the folder in the "All Users" profile.
AppDataFolder Property
MyPicturesFolder
C:\Documents and Settings\dgschnei\My Documents\My Pictures\
LocalAppDataFolder
C:\Documents and Settings\dgschnei\Local Settings\Application Data\
PersonalFolder
C:\Documents and Settings\dgschnei\My Documents\
Thank you in advance for your help.
Regards
Please don't send me direct emails, use the newsroom or go to
http://contactez.net/portfolio.html
/Andreas
"International Connections" <assi...@contactez.net> wrote in message
news:9a3d4722.03103...@posting.google.com...
> I'm hoping someone might be able to help me with these questions.
> I have some files that have to be installed in "C:\Documents and
> Settings\All Users\Shared Documents\" on XP and 2000 machines.
>
> Is there a MSI property I can use to get the path of the All Users
> Shared Documents folder?
> (C:\Documents and Settings\All Users\Shared Documents\")
> Under it, I need to create a folder named "Shared XXXProduct_Name" and
> create other folders and install files.
>
> If not, considering that the strings "Documents and Settings" and "All
> Users" and "Shared Documents" will be different on different machines
> depending of the language (French, German, Spanish.) is there a way to
Regards,
Sajan.
PS: Please don't send me direct emails, use the newsroom.
"International Connections" <assi...@contactez.net> wrote in message
news:9a3d4722.03103...@posting.google.com...
> I'm hoping someone might be able to help me with these questions.
> I have some files that have to be installed in "C:\Documents and
> Settings\All Users\Shared Documents\" on XP and 2000 machines.
>
> Is there a MSI property I can use to get the path of the All Users
> Shared Documents folder?
> (C:\Documents and Settings\All Users\Shared Documents\")
> Under it, I need to create a folder named "Shared XXXProduct_Name" and
> create other folders and install files.
>
> If not, considering that the strings "Documents and Settings" and "All
> Users" and "Shared Documents" will be different on different machines
> depending of the language (French, German, Spanish.) is there a way to
Thank you for your answer.
The [%ALLUSERSPROFILE%] gives me
C:\Documents and Settings\All Users\ unless I misunderstood I am still
missing the localized string for "Documents" or/and "Shared Documents"
I got the SHGetFolderPath(0, CSIDL_COMMON_DOCUMENTS Or
CSIDL_FLAG_CREATE, 0, SHGFP_TYPE_CURRENT, sPath) to work for me in a
VB exe.
sPath = Left(sPath, InStr(1, sPath, Chr(0)) - 1)
I get the correct path – I created a CA to run the EXE - up to there
it is fine.
But I am now trying to get the returned value sPath to be fed into the
MSI.
So I referenced the Microsoft Windows Installer Object Library into
the VB exe and I am now trying to use:
msiSession.Property("COMMONDOCProperty") = sPath
I also tried:
Dim msiSession As WindowsInstaller.Installer
Set msiSession = CreateObject("WindowsInstaller.Installer")
msiSession.Environment("COMMONDOCProperty") = sPath
COMMONDOCProperty is a property I created in the Property table.
But none of these are working, the returned value sPath is not fed in
the MSI so I still need help...
Thank you in advance and regards,
Please don't send me direct emails, use the newsroom or go to
http://contactez.net/portfolio.html
http://gurleyalabama.contactez.net
"Kallely Sajan" <saj...@hotmail.com> wrote in message news:<uDKdeluo...@TK2MSFTNGP09.phx.gbl>...
> Create a custom action type 51 with Target as [%ALLUSERSPROFILE]
> This will work in Win2K and newer machines.
Thank you for your answer.
I wish MSI would offer a property for that folder :O(
In VB6 I got it right in the languages (English, French, German,
Spanish, Italian...) using the Declared Function SHGetFolderPath and
the Private Constant CSIDL_COMMON_DOCUMENTS = &H2E
I get in return the spath localized value
C:\Documents and Settings\All Users\Documents
I then Referenced the Micosoft Windows Installer Objects into my VB
project and created the exe that gets the correct path.
So this is great...
But I am now trying to get the returned value Path to be fed into the
MSI.
I created a custom action and a property named COMMONDOCProperty
I tried without luck:
Dim msiSession As WindowsInstaller.Session
msiSession.Property("COMMONDOCProperty") = sPath
Set msiSession2 = Nothing
I also tried:
Dim msiSession As WindowsInstaller.Installer
Set msiSession = CreateObject("WindowsInstaller.Installer")
msiSession.Property("COMMONDOCProperty") = sPath
How can I feed the property COMMONDOCProperty (located in the Property
Table of the MSI) with the value returned from my EXE ?
Thank you again :O)
Regards
Please don't send me direct emails, use the newsroom or go to
http://contactez.net/portfolio.html
http://gurleyalabama.contactez.net
Andreas Magnusson" <andreas_c...@hotmail.com> wrote in message news:<uXGu$6eoDH...@TK2MSFTNGP09.phx.gbl>...
Regards,
Sajan.
PS: Please don't send me direct emails, use the newsroom.
"International Connections" <assi...@contactez.net> wrote in message
news:9a3d4722.03110...@posting.google.com...
> Sajan,
>
> Thank you for your answer.
> The [%ALLUSERSPROFILE%] gives me
> C:\Documents and Settings\All Users\ unless I misunderstood I am still
> missing the localized string for "Documents" or/and "Shared Documents"
>
> I got the SHGetFolderPath(0, CSIDL_COMMON_DOCUMENTS Or
> CSIDL_FLAG_CREATE, 0, SHGFP_TYPE_CURRENT, sPath) to work for me in a
> VB exe.
> sPath = Left(sPath, InStr(1, sPath, Chr(0)) - 1)
>
> I get the correct path - I created a CA to run the EXE - up to there
Thank you for the information concerning SHGetFolderPath and
ALLUSERSPROFILE. But I will try to use the CSIDL_COMMON_APPDATA
instead of the CSIDL_COMMON_DOCUMENTS.
I was able to easily get the CSIDL_COMMON_APPDATA value but it seems
harder to get the CSIDL_COMMON_DOCUMENTS value using a simple
vbscript. I prefer keep the process as simple as it can be; so a
Custom Action in Vbscript seems the best way to get the value of
CSIDL_COMMON_APPDATA into the MSI in all localized natural languages.
For some reasons on our machines a very small number of special
folders are not easily available from vbscript. Unless somebody can
share a straight forward vbscript code to expose the
CSIDL_COMMON_DOCUMENTS &H2E, I will settle to use the
CSIDL_COMMON_APPDATA &H23
In conjunction with
CSIDL_PERSONAL C:\Documents and Settings\dgschnei\My Documents folder
and
CSIDL_APPDATA C:\Documents and Settings\dgschnei\Application Data
I should be fine.
You have been very helpful.
Regards,
Please don't send me direct emails, use the newsroom or go to
http://contactez.net/portfolio.html
http://gurleyalabama.contactez.net
"Kallely Sajan" <saj...@hotmail.com> wrote in message news:<#GuCEhIp...@TK2MSFTNGP12.phx.gbl>...