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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:00:05+00:00 2026-05-16T00:00:05+00:00

How do you run another .exe from VB.NET but as another User? I expect

  • 0

How do you run another .exe from VB.NET but as another User?

I expect to launch a .exe like “Left Click -> Run As -> Enter User/Pass -> Click OK”
If I do that, my application runs as expected (I need to run it as another user to get access to some folders in the network)

But if I use this in VB.NET
System.Diagnostics.Process.Start(System.Windows.Forms.Application.ExecutablePath, PARAMETER, USER, PASSWORD, DOMAIN)

The application runs with the other user.. but Excel (inside my App with Interop) fails to open the file in the restricted folder.

(I run again the same app but with a different user, just to avoid creating more .exe files… but I already tried with vbScript)

Again, Process.Start FAILS to open excel using the other User… but Left Click -> Run as succedes at that… why?? another way??

this is what the app does:

  1. Open the app
  2. check if there’s a parameter
  3. if no parameter, then relaunch the application with the other user and send some parameter
  4. if there is a parameter open excel
  5. open a xlsx file

but if I double click… Excel opens… uses 50% CPU, and gives me the error that it can’t open the file…

if I run it directly with the desired user and pass… everything executes fine
Any suggestions as how to solve this? (impersonate works fine.. but it opens Excel with the actual user.. not the one with rights)

Thanks!

  • 1 1 Answer
  • 1 View
  • 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-16T00:00:06+00:00Added an answer on May 16, 2026 at 12:00 am

    This is really interesting. By default, I believe the Excel COM components are set up to run as the Interactive User (ie the user logged into the box). If they are configured to run as the Launching User then impersonation should work. Of course, this does not explain why “Run As…” works (I don’t know the mechanics of that so perhaps it’s not impersonation).

    One idea is to restructure the application to copy the files to a location Excel can access, manipulate them, and then copy the back.

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

Sidebar

Related Questions

I'm trying to run elevated process, say, file_copier.exe, from another host process with ShellExecuteEx
I want to run another Application (Polaris Office) directly from my Application. But it
I run a project on sourceforge called mqmanager.NET that I inherited from the original
I am trying to run .exe file, which uses another not executable files from
When I try to run a .NET assembly ( boo.exe ) from a network
how can i command to run file.exe file from another computer in my domain
I'm trying to run a batch file, as another user, from my web app.
In Perl, to run another Perl script from my script, or to run any
I have a nice dataset loop working, but I need to run another loop
I just run into another problem with my To-do-like sortable list made with Knockout

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.