title: Run Internet Explorer as a different user
body: <p>I'm trying to launch Internet Explorer with a different user to access a website that requires single sign on.</p>
  
  <p>Below is the code that I'm using. It doesn't produce any errors but IE doesn't launch at all, not even the process.</p>
  
  <pre><code>Try
  
      System.Diagnostics.Process.Start(IExplorerPath, Username, ConvertToSecureString(Password), Domain)
  
      Success = True
  
  Catch ex As Exception
  
      Success = False
      Error_Message = ex.Message
  
  End Try
  </code></pre>
  
  <p>I also tried the following variation with the same result (nothing):</p>
  
  <pre><code>Try
  
      Dim psi As New ProcessStartInfo()
  
      psi.Filename = IExplorerPath
      psi.UserName = Username
      psi.Domain = Domain
      psi.Password = ConvertToSecureString(Password)
      psi.UseShellExecute = False
      Process.Start(psi)
  
      Success = True
  
  Catch ex As Exception
  
      Success = False
      Error_Message = ex.Message
  
  End Try
  </code></pre>
  
  <p>This is the ConvertToSecureString function:</p>
  
  <pre><code>Function ConvertToSecureString(ByVal str As String)
      Dim password As New SecureString
      For Each c As Char In str.ToCharArray
          password.AppendChar(c)
      Next
      Return password
  End Function
  </code></pre>