Hi!
Does anybody know how I can get the personal folder? (for example 'C:\\My Documents')
Thanks,
Mike
How to get Personal Folder?
Use "Get Folder Location"
like this:
Get common folder location My->My documents into MYDOCUMENTS
just copy and pase the following code:
Code: Select all
~InstallAware Clipboard Data~
~Get Folder Location~
~{849C9F36-B4F5-48CA-840C-CE2EECD04AF0}~
~MYDOCUMENTS~
~2~
~TRUE~
-
- Posts: 52
- Joined: Thu Jan 26, 2006 9:09 am
Hi!
If the program is installed by an administrator, a normal user has no access to the given folder. (Of course not, it is the administrators 'My Documents' and not the users 'My Documents').
How can I get the following folder?
WinXP: 'C:\\Documents and Settings\\All Users\\Shared Documents'
Win2000: 'C:\\Documents and Settings\\All Users\\Documents'
Or is there a folder that shows its contents to all users in their 'My Documents' folder?
And why does
Get Common Folder Location My->My Documents into PERSONALFOLDER
return the same as
Get Folder Location My->My Documents into PERSONALFOLDER
Greetings,
Mike
If the program is installed by an administrator, a normal user has no access to the given folder. (Of course not, it is the administrators 'My Documents' and not the users 'My Documents').
How can I get the following folder?
WinXP: 'C:\\Documents and Settings\\All Users\\Shared Documents'
Win2000: 'C:\\Documents and Settings\\All Users\\Documents'
Or is there a folder that shows its contents to all users in their 'My Documents' folder?
And why does
Get Common Folder Location My->My Documents into PERSONALFOLDER
return the same as
Get Folder Location My->My Documents into PERSONALFOLDER
Greetings,
Mike
-
- Posts: 52
- Joined: Thu Jan 26, 2006 9:09 am
Mike,
Paste the following into a script and try it;
Which is;
Paste the following into a script and try it;
Code: Select all
~InstallAware Clipboard Data~
~Runtime Debug~
~{BB11D546-8C37-43FA-8970-5F98449C7632}~
~V10CMDLINE|/Debug~
~Runtime Debug IDE-PlugIn.dll\\Runtime Debug EXE-PlugIn.dll~
~End~
~{E1395705-EACC-45AD-A061-D7CE5ACF0B1E}~
~End~
~{948EB789-6F02-4D02-BC0C-3A10A12E9EC5}~
~End~
~{0689788D-F9EF-451C-A300-0D5B2BA90C46}~
~Set Variable~
~{C729F520-A8E5-4AF8-A18A-0376EE412569}~
~ALLUSERDOCS~
~$ALLUSERDOCS$Documents~
~If~
~{775616D5-F377-4714-989E-A0F569BE3327}~
~OSVER~
~0~
~TRUE~
~FALSE~
~Get System Settings~
~{FA276955-FD35-45DC-87E2-228643BCA9CF}~
~OSVER~
~24~
~Else~
~{1BBFFAFF-725A-4286-B910-BF491E0D90FC}~
~Set Variable~
~{6C2301C0-6789-4990-94AF-E234DF3E7725}~
~ALLUSERDOCS~
~$ALLUSERDOCS$Shared Documents~
~If~
~{991825DC-07A8-498B-BEC9-5CF4EDA8778E}~
~XPBASE~
~0~
~TRUE~
~FALSE~
~Parse String~
~{72E1FD43-9778-454C-86FF-BA35D9288FE4}~
~$ALLUSERSAPPDIR$~
~Application Data~
~ALLUSERDOCS~
~GARBAGE~
~0~
~TRUE~
~TRUE~
~Eval~
~{2B749504-87DE-4A98-8F3A-9D771E0E5A40}~
~$OSVERXP$="TRUE" or $OSVER2003$="TRUE"^|^XPBASE~
~mIDEEval.dll\\mEXEEval.dll~
~Get System Settings~
~{24B97172-545C-44D4-A8AC-B0DE8EC01ECA}~
~OSVER2003~
~26~
~Get System Settings~
~{B1F566B7-CB85-44DB-81A8-8D8C6249A646}~
~OSVERXP~
~25~
~If~
~{0B5CA103-2F4B-428D-A77A-BAA6581AAC6A}~
~OSVER~
~0~
~TRUE~
~FALSE~
~Get System Settings~
~{892DD891-D9DA-422D-BBE8-892CF9592A56}~
~OSVER~
~18~
~Get Folder Location~
~{FCBDB591-422D-4AA9-AE11-E1A7A42DAF4D}~
~ALLUSERSAPPDIR~
~15~
~TRUE~
~Set Variable~
~{78BAF4CF-4E83-4078-A222-2594AF18717A}~
~XPBASE~
~~
Which is;
Code: Select all
Set Variable XPBASE to
Get Common Folder Location System->Application Data Directory into ALLUSERSAPPDIR
Get System Setting Windows NT Kernel (NT4, 2000, XP, 2003) into OSVER
if Variable OSVER Equals TRUE
Get System Setting Windows XP into OSVERXP
Get System Setting Windows 2003 into OSVER2003
Eval XPBASE = $OSVERXP$="TRUE" or $OSVER2003$="TRUE"
Parse String $ALLUSERSAPPDIR$ into Variables ALLUSERDOCS and GARBAGE (Split at first occurrence of pattern)
if Variable XPBASE Equals TRUE
Set Variable ALLUSERDOCS to $ALLUSERDOCS$Shared Documents
else
Get System Setting Windows 2000 into OSVER
if Variable OSVER Equals TRUE
Set Variable ALLUSERDOCS to $ALLUSERDOCS$Documents
end
end
end
Runtime Debug: Show variables list
Jim Oswell
Software Engineering Manager, Dental
Greenway Health, LLC
http://greenwaymedical.com
Software Engineering Manager, Dental
Greenway Health, LLC
http://greenwaymedical.com
-
- Posts: 52
- Joined: Thu Jan 26, 2006 9:09 am
Thank you for the script.
But there´s still one thing missing: This solution works only with english operating systems.
Modifying the script to work with most languages (including chinese) would be quite an anoying (and error-prone) procedure, I think.
Maybe InstallAware could enhance the 'Get common Folder Location' command for one of the next versions?

But there´s still one thing missing: This solution works only with english operating systems.
Modifying the script to work with most languages (including chinese) would be quite an anoying (and error-prone) procedure, I think.
Maybe InstallAware could enhance the 'Get common Folder Location' command for one of the next versions?
-
- Posts: 904
- Joined: Thu Dec 22, 2005 7:03 pm
- Contact:
Hi!
A typical path for "Shared Documents" seems to be:
Searching for this value in the registry yields the following key:
So reading this key should always yield the proper result, regardless of OS language!
A typical path for "Shared Documents" seems to be:
Code: Select all
"C:\\Documents and Settings\\All Users\\Documents"
Searching for this value in the registry yields the following key:
Code: Select all
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders"
Code: Select all
Value: "Common Documents"
Data: "C:\\Documents and Settings\\All Users\\Documents"
So reading this key should always yield the proper result, regardless of OS language!
Candice Jones
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Who is online
Users browsing this forum: No registered users and 168 guests