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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:53:24+00:00 2026-05-20T00:53:24+00:00

The documentation for GetWindowsDirectory says: TS-Aware applications get the actual Windows directory. Non-TS-Aware applications

  • 0

The documentation for GetWindowsDirectory says:

  • TS-Aware applications get the actual Windows directory.
  • Non-TS-Aware applications get the current user’s “private” Windows directory.

So, I am working on a C# class library that needs to be TS-Aware, because I cannot require all apps using this library to be non-TS-Aware. The C# default is to be TS-Aware.

I need to drop INI files into the Windows directory to communicate with a legacy App that is NOT TS-Aware. This works without difficulty in a regular user, but not in a Terminal Services session.

Under Terminal Services:

  • The Legacy App uses the INI file in the user’s “private” Windows directory.
  • The C# library uses the INI file in the system Windows directory.

I need to:

  1. Detect when running under Terminal Services. I can do this by checking the SystemInformation.TerminalServerSession flag.
  2. From a TS-Aware process, locate the user’s “private” Windows directory. I can find no documentation that tells me how to do this.
  • 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-20T00:53:25+00:00Added an answer on May 20, 2026 at 12:53 am

    I think it is always under the user folder in the windows sub directory, so:

    System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "windows");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The documentation for +[NSThread detachNewThreadSelector:toTarget:withObject:] says: For non garbage-collected applications, the method aSelector is
Documentation states: Adds a user-defined custom member to an instance of a Windows PowerShell
Python documentation says that os.rename(src, dst) ... On Windows, if dst already exists, OSError
Documentation can be found here It says in the example: onDrop: Called whenever a
Documentation says: The Grails team discourages the embedding of core application logic inside controllers,
Documentation says: Changes to fields of the passed entities are not recognized by the
The documentation for NSDictionary says that the method objectForKey returns nil if the NSDictionary
The documentation says there's a limit to the number of regions that can be
The documentation on Text Properties says: Since text properties are considered part of the
The documentation of CharUnicodeInfo.GetUnicodeCategory says: Note that CharUnicodeInfo .GetUnicodeCategory does not always return the

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.