Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>"Shared Documents" Directory in Windows XP</p> <pre><code>C:\Documents and Settings\All Users\Documents </code></pre> <p>Or,</p> <pre><code>%ALLUSERSPROFILE%\Documents </code></pre> <p>Corresponding directory in Vista/7</p> <pre><code>C:\Users\Public </code></pre> <p>Or,</p> <pre><code>%PUBLIC%\Documents </code></pre> <p>But what you are really looking for, is the <a href="http://msdn.microsoft.com/en-us/library/dd378457%28v=VS.85%29.aspx" rel="nofollow">KNOWNFOLDERID</a> value of <code>FOLDERID_PublicDocuments</code> (legacy <code>CSIDL_COMMON_DOCUMENTS</code>). The <a href="http://msdn.microsoft.com/en-us/library/bb762181%28VS.85%29.aspx" rel="nofollow">SHGetFolderPath </a> function can then get you the path. </p> <p>Or an easier VBScript alternative, but I'm not sure how reliable this is across OS versions:</p> <pre><code>Const CSIDL_COMMON_DOCUMENTS = &amp;h2e Set oShell = CreateObject("Shell.Application") Wscript.Echo oShell.Namespace(CSIDL_COMMON_DOCUMENTS).Self.Path </code></pre> <p>I think <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/bb774085%28v=vs.85%29.aspx" rel="nofollow">NameSpace</a> doesn't accept that particular <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/bb774096%28v=vs.85%29.aspx" rel="nofollow">constant</a>. So you might be able to take <code>COMMONAPPDATA = &amp;H23</code> and then use its parent. But that's not very clean or internationalized:</p> <pre><code>Wscript.Echo oShell.NameSpace(&amp;h23).ParentFolder.Self.Path &amp; "\Documents" </code></pre> <p>But since you are using Inno Setup, you should really be using the {commondocs} <a href="http://www.jrsoftware.org/ishelp/index.php?topic=consts" rel="nofollow">Shell Folder Constant</a> and make it easy for yourself.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload