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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:23:21+00:00 2026-05-10T17:23:21+00:00

My C# application crashes under some circumstances when run with a non-admin user. I’m

  • 0

My C# application crashes under some circumstances when run with a non-admin user.

I’m experiencing a problem with Windows Server 2003 and I’m trying to find more information about it. It may be a problem on other Windows OS’s.

It seems that if I create a non-admin user, and then run my application under this user with the ‘Run as…’ command, the users environment doesn’t get set up correctly, and the TEMP environment variable points at C:\Windows\Temp instead of the users having their own Temp folder in the Documents and Settings profile. The user doesn’t have permissions to this folder, so the application crashes with the .Net JIT compiler tries to write/read to this folder.

If I log on as this user, the situation is still wrong. I don’t get the Environment being prepared thingy you normally get when logging on a new user, and my app still won’t run without crashing during startup. Infact I’ve realized the user can’t run calc.exe or other programs in the Windows folder. It appears that their environment is permanently messed up and I guess the only way forward is to delete their profile.

If I create a non-admin user, and log on as them before doing a ‘Run as..’, they’re environment gets set up ok, and my application works.

I can’t find any information on this problem or notes on whether Microsoft acknowledge it. Have you experienced this, or do you know where I can look to find more about it?

  • 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. 2026-05-10T17:23:22+00:00Added an answer on May 10, 2026 at 5:23 pm

    Consider using runas with a profile for the user if you are not.

    C:\temp>runas RUNAS USAGE:

    RUNAS [ [/noprofile | /profile] [/env] [/netonly] ]         /user: program  RUNAS [ [/noprofile | /profile] [/env] [/netonly] ]         /smartcard [/user:] program 

    /noprofile specifies that the user’s profile should not be loaded. This causes the application to load more quickly, but can cause some applications to malfunction.
    /profile specifies that the user’s profile should be loaded. This is the default. /env to use current environment instead of user’s. /netonly use if the credentials specified are for remote access only. /savecred to use credentials previously saved by the user. This option is not available on Windows XP Home Edition and will be ignored. /smartcard use if the credentials are to be supplied from a smartcard. /user should be in form USER@DOMAIN or DOMAIN\USER
    program command line for EXE. See below for examples

    Examples:

    runas /noprofile /user:mymachine\administrator cmd runas /profile /env /user:mydomain\admin 'mmc %windir%\system32\dsa.msc' runas /env /user:user@domain.microsoft.com 'notepad \'my file.txt\''

    NOTE: Enter user’s password only when prompted. NOTE: USER@DOMAIN is not compatible with /netonly. NOTE: /profile is not compatible with /netonly.

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

Sidebar

Ask A Question

Stats

  • Questions 122k
  • Answers 122k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer using the code example from your link, you could add… May 12, 2026 at 12:52 am
  • Editorial Team
    Editorial Team added an answer best solution I can think of is to build your… May 12, 2026 at 12:52 am
  • Editorial Team
    Editorial Team added an answer The main problem I had with this was that I… May 12, 2026 at 12:52 am

Related Questions

My C# application crashes under some circumstances when run with a non-admin user. I'm
I'm testing my application under the user Guest. It crashes with the following error.
I'm looking for some random crashes in an old c++ application. Using sysinternals process
I'm encountering problems with my .NET Framework 3.0 SP1 application. It is a C#
I have written a really small 64-bit application that crashes on clean installations of

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.