terminal-services

Get UserToken from Logon ID (LUID) (C++)

て烟熏妆下的殇ゞ 提交于 2019-12-06 14:39:18
I'm trying to understand better how Windows sessions work, so if I have some weird mistakes in the question, please, let me know. I use LsaEnumerateLogonSessions() to get all the logged on sessions in the system. Now I have LUID that represents a log-on, and if I understand correctly, it represents a user that logged on or a build it user like SYSTEM. Now, if user X starts a process, Windows gives that process a token that represents X. Is there a way (in a Windows service) to get the user's token from LUID? I know I can get it from a process HANDLE, but that is not what I want. kichik You can

How can i get the Client Computer name

一个人想着一个人 提交于 2019-12-04 20:31:22
I am using C# Framework 4.0 Windows Form. My program is installed on a server TSE. There are 11 light clients that connect to this server. When one of these clients launches my progam, how can I get his PC name ? Panagiotis Kanavos Assuming you are using Terminal Services and Remote Desktop, you can check the CLIENTNAME environment variable to retrieve the client machine's name, although some people report problems with it. You can get the value with Environment.GetEnvironmentVariable , eg var clientName=Environment.GetEnvironmentVariable("CLIENTNAME"); For an API based method, check Preferred

Generating RDP file on the fly

☆樱花仙子☆ 提交于 2019-12-04 05:51:09
I want to create a web application similar to TS Web Access, where I can create rdp files on the fly for Remote Apps configured on the server. Any idea?? Naraen We had to do this exact thing. private void InvokeRDPSign(String fileName, String certificateThumbPrint) { Process signingProcess = new Process(); signingProcess.StartInfo.FileName = @"rdpsign.exe"; String arguments = String.Format("/sha1 {0} {1}", certificateThumbPrint, fileName); signingProcess.StartInfo.Arguments = arguments; signingProcess.StartInfo.UseShellExecute = false; signingProcess.StartInfo.RedirectStandardOutput = true;

Delphi 2007 : How to Set TSAWARE?

谁说我不能喝 提交于 2019-12-04 04:22:17
In Delphi 2009 and up you can add this line to your project .dpr to set the TSAWARE PE flag in your application executable: {$SetPEOptFlags IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE} I thought (wrongly) that this syntax is not supported in Delphi 2007. I have an application that I cannot port from 2007 to a newer Delphi version just yet (the task is underway, but it will not be done in the next few months). Update it was simply that Windows must be added to the project .dpr also. My guess is that you are missing the Windows unit from your .dpr file's uses clause. Add that and you will be

Programming .NET apps for Citrix/Terminal server: Compliance and Pitfalls

别说谁变了你拦得住时间么 提交于 2019-12-03 14:12:59
问题 We are a bit lost here. We need to make our app installable on a network with 80+ Citrix servers. Although our app is 100% valid and working .NET, we've experienced some (for us weird) behavior: You cannot use any "Documents and settings" folders for storing data or settings. Apparently these folders are virtualized and are located in multiple places. Checking if a file exists (i.e., in your own 'program files' folder) doesn't work. Probably for the same reason. Why is the filesystem behaving

Programming .NET apps for Citrix/Terminal server: Compliance and Pitfalls

可紊 提交于 2019-12-03 04:18:12
We are a bit lost here. We need to make our app installable on a network with 80+ Citrix servers. Although our app is 100% valid and working .NET, we've experienced some (for us weird) behavior: You cannot use any "Documents and settings" folders for storing data or settings. Apparently these folders are virtualized and are located in multiple places. Checking if a file exists (i.e., in your own 'program files' folder) doesn't work. Probably for the same reason. Why is the filesystem behaving this way? How do you need to store your data to make an app work on Citrix? Are there any other

How to get terminal services property values in Active Directory from userParameters attribute

耗尽温柔 提交于 2019-12-02 07:21:01
I am using dirsync to get the attributes value that have changed in Active Directory(changelog). The following link explains how the dirsync is used to get attribute values : ' http://blogs.technet.com/b/isrpfeplat/archive/2010/09/20/using-the-dirsync-control.aspx ' I am changing the attribute Local path under Remote Desktop Services Profile of a user. I have ran a client which uses dirsync to get the changed objects in AD. In the client the attribute that is changed is userParameters and the value is in encrypted form. CtxCfgPresent P☺CtxCfgPresent???? ☻☺CtxWFProfi lePath?↑→☺CtxWFHomeDir?????

How to get terminal services property values in Active Directory from userParameters attribute

和自甴很熟 提交于 2019-12-02 07:18:41
问题 I am using dirsync to get the attributes value that have changed in Active Directory(changelog). The following link explains how the dirsync is used to get attribute values : 'http://blogs.technet.com/b/isrpfeplat/archive/2010/09/20/using-the-dirsync-control.aspx' I am changing the attribute Local path under Remote Desktop Services Profile of a user. I have ran a client which uses dirsync to get the changed objects in AD. In the client the attribute that is changed is userParameters and the

Add logon program for TSclients in environment tab user adsi in Powershell

时间秒杀一切 提交于 2019-12-01 12:10:24
Hi I'm tring to set a logon program parameter for remote clients that will be created using a powershell script. As shown below I managed to get a logon script to set in the profile tab using $objUser.PSBase.InvokeSet('LoginScript', "logoff.cmd") As seed in this thread here The problem is I can't find the attribes in ADSIedit also some attrribes that I use and work aren't shown in ADSIedit such as PasswordExpired which leads me to believe the attribute does exsist. Below is my code $objComputer = [ADSI]"WinNT://127.0.0.1" $objUser = $objComputer.Create('user', $username) $objUser.SetPassword(

Managing terminal users through System.DirectoryServices

自古美人都是妖i 提交于 2019-12-01 10:38:01
问题 I have a environment where I need to frequently change the parameters to a program that is launched when a user logs in to the terminal server. As of right now we open the computer management snap-in and edit the environment tab for the user and change the parameters by hand under "Start the following program at logon:". I would like to automate the process. I have been looking in to System.DirectoryServices and System.DirectoryServices.AccountManagement and reading all I can about it. So far