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

  • Home
  • SEARCH
  • 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 4581442
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T20:55:39+00:00 2026-05-21T20:55:39+00:00

I have a windows service written in C#. This service spawns a number of

  • 0

I have a windows service written in C#. This service spawns a number of MTA threads. In each of those threads an out of process COM class is instantiated. I set the service to run as my current user (add the appropriate log in credentials). When the service starts it appears from Task manager that it is running as my user. If the service does a check for the local roaming user directory it returns my user directory as expected. When my COM class which is running as an out of process exe does this check, it returns a path in Windows\System32\Config\systemprofile\AppData\Roaming.

Can anyone shed some light on what is going on here, and even more specifically, how can I get the out of process server to run as the service user. I have checked in the task manager and according to task manager the exe is running as the same user (in the same session) as the service.

Not sure if the OS is a factor, but I have seen this on both Vista 32 (sp2) and Win7 64 (sp1)

  • 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-21T20:55:40+00:00Added an answer on May 21, 2026 at 8:55 pm

    You can get the server to run as a specific account using RunAs. Not very flexible but seems to do what you want here.

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

Sidebar

Related Questions

I have a Windows service written in C# that spawns several worker threads. Those
I have written a Windows service that spawns a separate process. This process creates
I have Windows Service written in C#. It starts two threads, one is pooling
I have written a windows service in C# .NET. This windows service contains a
I have a windows service written around some code similar to this Asynchronous Server
I have a Windows Service written in .NET C# which calls a COM component.
I have written a code that sends out Email from Windows Service. Now when
We have a Windows Service written in C#. The service spawns a thread that
I have a Windows Service written in Delphi which runs a number of programs.
I have a Windows Service written in C# that handles all of our external

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.