question

AnshulMittal-2591 avatar image
0 Votes"
AnshulMittal-2591 asked AnshulMittal-2591 commented

COM application launching as different user in terminal server

This issue is specific to terminal server only. I have 2 applications (both COM exe's) 1 implemented as singleton and launches as administrator everytime correctly. The application 1 launches second application using CLSCTX_LOCAL_SERVER. The issue is that the application 2 is launched as the first user(User2) who launched the application 1. Example : there are 3 users (User1 (administrator), User2, User3). I launch app1 from User2 which launches app correctly but second time when i try to launch from user3 the app2 still launches as User1 instead of User2.

windows-apic++
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I think this may not be a problem caused by the API, Could you please show a minimal, reproducible sample without private information?

0 Votes 0 ·

Hi,

It is difficult for me to extract code from the huge code base to show here. But there are 2 COM exe's "Exe1" and "Exe2" (names changed). There is a COM server which is a windows application. The COM server initializes Exe1 using CoCreateInstance. In terminal server the Exe1 is initialized as User1 even though COM server initializes it from User2. In normal remote desktop services Exe1 is initialized as User2 which is the user currently running COM server.

This is critical because we need to support terminal services also for our application and cannot be restricted to only remote desktop services.

0 Votes 0 ·

0 Answers