title: Full shell (explorer.exe) running for a RemoteApp on Terminal server
body: <p>Folks,
  I'll been fighting this for a few weeks now. We have a proprietary corporate app running on thin clients in our organization. From this app we can apply VBA scripting behind the scenes to do simple functions. In the past adding buttons to open IE and direct them to certain web sites to enter data, open Calc and etc. </p>
  
  <p>Recently I have been working the code below.  It was developed on the Server using a RDP session which launches the full desktop and explorer.exe. What I have noticed that if explorer.exe isn't running then the code bombs at line in the function that reads "<strong>For Each oWin In oShApp.Windows</strong> " with "Run-time error '429'".</p>
  
  <p>However if I script to start explorer.exe (which is bad because it enables the Start-bar and Task-bar) on the ThinClient which launches the desktop and full capabilities and it runs just fine as the Thin Client users that are logged in.
  I have read a little bit about the "Limited Shell" that runs when using a remoteapp and not the full desktop and was wondering if there was anyway around it, without enable the start-menu and taskbar?</p>
  
  <p>See the code below.
  Thanks for the help, CreteIT</p>
  
  <pre><code>Private Sub cmdHomePage_Click()
  Dim ie As Object
  Dim sMatch As String
  sMatch = "http://www.companyweb.com"
      On Error Resume Next
  Set ie = GetIEatURL(sMatch &amp; "*")
  On Error GoTo 0
  If Not ie Is Nothing Then
      ShowWindow ie.hwnd, 9
      BringWindowToTop ie.hwnd
  Else
      Dim strHome
      Dim strAPP
      strHome = "c:\progra~1\intern~1\iexplore.exe www.companyweb.com"
      strAPP = Shell(strHome, vbNormalFocus)
  End If
  End Sub
  
  Function GetIEatURL(sMatch As String) As Object
  Dim ie As Object, oShApp As Object, oWin As Object
  Set oShApp = CreateObject("Shell.Application")
  For Each oWin In oShApp.Windows
      If TypeName(oWin.Document) = "HTMLDocument" Then
          Set ie = oWin
                  If LCase(ie.LocationURL) Like LCase(sMatch) Then
                  Set GetIEatURL = ie
          Exit For
                  End If
              End If
  Next
  Set oShApp = Nothing
  Set oWin = Nothing
  End Function
  </code></pre>