Does the C # console application run under the current user account?

Before you open your big mouth and say that this is the default, the console application works in C #. I wanted to get an opinion from some of you.

Essentially, we have a C # console application that creates a folder full of files from byte streams. Pretty simple. Now they want them to write directly to the shared drive, and only a few people have read / write permissions.

I think that as long as they kick exe during login, as a user, it will be copied to the shared drive.

Unfortunately, they want this information without creating a folder and sharing it. sigh b / c, which would be too simple to just check the thing exploded.

+7
source share
4 answers

To answer the question in the title of your question, yes, the C # console application runs under any account in which you run it.

Please note that you can right-click on the executable file and click “run as” or “run as administrator”, instead of logging in as another user.

I hope I do not miss the point of your question.

+7
source

By default, yes, it will run under user credentials (like any other application).

Of course, if this is being performed as a scheduled task, using the Process or runas , you can specify another user.

+3
source

If you open the task manager, you will see the owner of the process in the "Username" column.

+2
source

Any application runs without specifying a specific user (Run as ...) runs by default, registered in the user context.

+1
source

All Articles