title: geting special folders with shell.application
body: <p>I need in a script to return the path to the current user desktop. Now I know you can do it with WScript. </p>
  
  <pre><code>var WshShell = WScript.CreateObject("WScript.Shell");
           strDesktop = WshShell.SpecialFolders("Desktop");
  </code></pre>
  
  <p>But for my script this will not work as I cant use WScript. but I can use the shell.application object as below. </p>
  
  <pre><code> dim objShell
          dim ssfWINDOWS
          dim objFolder
  
          ssfWINDOWS = 0
          set objShell = CreateObject("shell.application")
              set objFolder = objshell.BrowseForFolder(0, "Example", 0, ssfWINDOWS)
                  if (not objFolder is nothing) then
                  Set objFolderItem = objFolder.Self
                      g_objIE.Document.All("logdir").Value = objFolderItem.path
                  end if
              set objFolder = nothing
          set objShell = nothing
  </code></pre>
  
  <p>what is the syntax so the rather than "BrowseForFolder" i can simple return the path of the current users desktop? </p>
  
  <p>IE replace the line </p>
  
  <pre><code>set objFolder = objshell.BrowseForFolder(0, "Example", 0, ssfWINDOWS)
  </code></pre>
  
  <p>with the equilivent of.</p>
  
  <pre><code>strDesktop = WshShell.SpecialFolders("Desktop");
  </code></pre>
  
  <p>Cheers</p>
  
  <p>Aaron </p>