Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8427077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:42:01+00:00 2026-06-10T04:42:01+00:00

I’m trying to launch Internet Explorer as another user from our WPF app, so

  • 0

I’m trying to launch Internet Explorer as another user from our WPF app, so that when our users visit the (internal) website, they silently authenticate via Integrated Windows Authentication.

We do not want to launch iexplore.exe as the other user because of weird deployment/environment issues that occur when you launch a process for the first time on a computer and it attempts to set up IE7/8 for the first time. Though, if you have a solution for how to mute every IE installer on every machine, I’d love to hear it.

Back to my intended question. I’m able to get the exact IE impersonating behavior I want* from the command prompt using runas (thanks to https://serverfault.com/questions/70376/runas-domain-account-still-asks-for-password):

c:\> runas /noprofile /netonly /user:MyDomain\MyUser iexplore.exe

*note: I can’t use runas for our WPF app for many reasons, but the end result is what I want.

Anyway, I’d like the C# equivalent code that does a runas /noprofile /netonly iexplore.exe.

I am halfway there with P/Invoke on CreateProcessWithLogonW. This is what I have:

uint LOGON_NETCREDENTIALS_ONLY = 2;
var lpStartupInfo = new CreateProcessWithLogonW_PInvoke.STARTUPINFO();
CreateProcessWithLogonW_PInvoke.PROCESS_INFORMATION processInformation;

CreateProcessWithLogonW_PInvoke.CreateProcessWithLogonW(
                userName,
                domain,
                pw,
                LOGON_NETCREDENTIALS_ONLY,
                null,
                commandLine,
                0,
                null,
                null,
                ref lpStartupInfo,
                out processInformation);

This successfully launches Internet Explorer, but does not seem to impersonate the user at all. I am able to impersonate the user via the runas command, so I’m 98% sure the failure to authenticate isn’t an IE/zone/password/IIS setting, it’s just something I’m not doing right in my call to CreateProcessWithLogonW().

One thing I’ve noticed is that the runas /netonly command only works if I add the /noprofile switch, which is something that is stumping me. I have no idea how to set the equivalent of this switch via P/Invoke in C#.

Help is appreciated with either solution (solving the “IE runs a wizard when I launch it the first time”, or finding the weirdo P/Invoke setting I’m missing).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T04:42:02+00:00Added an answer on June 10, 2026 at 4:42 am

    Okay, I was very very close. The magic fix is adding -noframemerging to the iexplore.exe call, which…honestly I’m not sure what it does, it uses the phrase “process frame” which is awesome and perhaps means something to you.

    In any case, this appears to be resolved.

    var arguments = "-noframemerging " + url;
    var pathToIExploreExe = GetFullPathToIExploreExe();
    var commandLine = string.Format("\"{0}\" {1}", pathToIExploreExe, arguments);
    
    uint LOGON_NETCREDENTIALS_ONLY = 2;
    var lpStartupInfo = new CreateProcessWithLogonW_PInvoke.STARTUPINFO();
    CreateProcessWithLogonW_PInvoke.PROCESS_INFORMATION processInformation;
    
    CreateProcessWithLogonW_PInvoke.CreateProcessWithLogonW(
                userName,
                domain,
                pw,
                LOGON_NETCREDENTIALS_ONLY,
                null,
                commandLine,
                0,
                null,
                null,
                ref lpStartupInfo,
                out processInformation);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to create an if statement in PHP that prevents a single post
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.