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 590605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:32:51+00:00 2026-05-13T15:32:51+00:00

I need to be able to run a process as a different user, and

  • 0

I need to be able to run a process as a different user, and I’ve found plenty of resources and different methods to do this. The problem is, I need to run a non-exe process, e.g. a path with html extension, or in my case, “http://somewebserver/someApp.application“.

There’s a known problem in which launched processes don’t inherit impersonation contexts from their launcher, and there’s also a known problem in which processes launched under different credentials need to be executable files (.exe).

But how would I launch a .application file (for example) as a different user?

(I’ve tried all sorts of combinations of p/invoking CreateProcessWithLoginW, setting user/password credentials in ProcessStartInfo, etc. Each face the same limitations mentioned above.)

  • 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-05-13T15:32:52+00:00Added an answer on May 13, 2026 at 3:32 pm

    When launching a non-exe, it’s actually just the shell looking up the exe to use for the file or URL. There’s still an exe involved.

    Since the shell is already running, it’s not going to inherit your impersonation. You could look up the exe yourself in the registry and then call CreateProcessWithLoginW, essentially simulating what the shell is doing for you.

    For example, to open a .txt file, look in “HKEY_CLASSES_ROOT\.txt”. There you’ll see the type is “txtfile.” Then look up “HKEY_CLASSES_ROOT\txtfile\shell\open\command” and you’ll see what exe file the shell will use, which is (normally) “%SystemRoot%\system32\NOTEPAD.EXE %1”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to be able to run RegLoadKey() on a remote machine, and it
I need to be able to run an Oracle query which goes to insert
What exactly does a mobile need to be able to run JavaFX? Can it
I need to be able to determine at run time what compilation options were
I need to be able to specify a command to run when the SelectionChanged
I'm searching for a solution where I'm able to run different functions, but some
I have a process I'd like to be able to run in the background
Users of the website need to able to store images in their area ,
Need to be able to pull Magento products into an external template. Need to
I need to be able to access a list throughout my Rails project. For

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.