I have WPF application, let's say Application1, run under User1. I need to access user scoped settings of User2 in AppData folder for Application2.
So, what's really happening is this:
- User1 is logged in user, in windows
- User1 is actually person associated with account User2
- User1 starts Application1
- Application1 asks for credentials to ensures User1 starts application (see next bullet) as appropriate user (User2 in this case)
- Now, Application1 should run Application2 with provided credentials, but before that, it should check User2 settings for Application2
How can I do that without running Application1 as User2?
If I can change process owner for Application1 at run time to do that, that would also be acceptable solution.