I have written a WPF application that I want to show (the UI) every time a user logs into a server. It must show on user login but also when a user connects to a existing console session via RDP.
I have no trouble with new user login.
The issue I'm having is invoking my application when a user connects to the console session, a existing user session on the server.
The most obvious way would be to setup a scheduled task, there is specific support for this but the UI will only show the UI for the user who it is 'running as', as defined in task scheduler. So I may have not be able to use this as it must launch and show the UI to any user who connects to an existing console session.
How can I achieve this, to detect / launch an interactive application when a user connects via RDP to an already logged in console session? I'm stuck.
Thanks
Related
I have a windowless wpf app that's taking messages from an asp.net core app via signalr and displaying them to the user. I also have a NotifyIcon that has one right click option to open the web app in the browser (Process.Start). The problem is, the web app is using Windows Auth and the process is started as the computer and not the user, thus not being authenticated. How do I get the process to start as the user?
I can't use process.UserName, because that requires a password, and I don't want the user to enter the password everytime. I've also tried process.LoadUserProfile but that doesn't seem to do anything.
I have a program that communicates with a network based RFID reader and I need to be able to read tags and update the database before the system is logged in. That shouldn't be difficult, just need to use the task scheduler or similar to run on system boot.
I cannot seem to find a solution on how to open my form when a user actually logs in.
To clarify, I want the program to start before any user logs in, then when a user logs in, I want the form to open. Then, from the form, I will have the User logout and the program will resume until the next user logs in. My main program will always be running regardless of the user state.
As far as I can tell, my only other option would be to have two separate applications, one that runs as a service and is suspended upon user login, the other that opens the form and resumes RFID monitoring while a user is logged in, then when the user logs out, the service resumes its monitoring.
Coding in C# with a Windows Form Application.
Thanks for your help!
I have an application I Am developing that will be installed into a Citrix Server Farm environment where multiple Users will connect using Citrix XenApp. I want to incorporate ' into the application so that when a User runs up the application it will check for updates and prompt the User to update the application.
I have some uncertainties about this, specifically what considerations I need to make when installing my application on Citrix, e.g. If User A (and many other Users) is in the application and User B launches the application and gets prompted to update how will should this get handled if the application is installed in Program Files where it typically should be installed?
Should I install the application in Program Files and "shadow copy" to the User directory for execution?
Should I install the Application per user when each User first logs in?
Or are there other considerations to be made?
Hope someone has encountered this and can help
I would recommend to install the application per user when each user first logs in. In this way, when a user starts the app, it will update that user's copy and you will avoid file locks that will happen when a second user starts the app when it is being updated.
I have a C# application that is used to capture users screen, this application will be installed using an installer that requires administrator permissions. the application itself needs an active user session but doesn't display any UI elements of its own. My question how to make sure that the application is running whenever a user logs in? and how to make sure that no user (with no admin permission) can close the application?
The application should run on windows XP, 7, 8.
You can install the application so that it starts with every start of windows. You can use the registry for that or the (default user) startup folder.
An user without admin rights will not be able to kill an application that is not his, so if you start the application using i.e. the local system account, he won't be able to kill it. He will not even be able to see it, because the function "show processes from all users" in task manager is limited to users with admin permissions.
Disclaimer: Be aware that under certain legislations, it might be illegal to install such an application in a company network without the users knowing about it.
Use the Task Scheduler. It can launch apps at user logon with elevated privileges. Otherwise if it does not have to be a foreground App use a Windows service.
a client of mine uses the task manager to trigger (start) a process to do something. This process contains a UI, and needs to be a single instance at all times (been taken care of).
Everything runs smoothly from the task manager, accept if you need to set the task manager settings to:”run whether user is logged on or not” (see the answer why this is a problem here: http://social.technet.microsoft.com/Forums/en-US/c03d6691-b058-4f8d-961c-e8eba25bbaed/task-scheduler-problem-run-whether-user-is-logged-on-or-not
Ok..no problem. We just let the task run only if the user is logged on. Still works fine (even with computer locked).
But, this night windows had an update and the system automatically rebooted. Logging of the user and therefor the task manager was not able to run the tasks. :-(
Since the program has a UI (is needed), I cannot switch to “run whether user is logged on or not”.
What would be best practice to:
logon again as the user that needs to run the application
make sure that the started application, is actually visible to the user, when he logs in? (unlockes the computer)
I know how to run processes with different user credentials in C#, but that’s not the solution for this problem.
Automatically logon a user (and lock the computer) when the computer has started, would be great.
Is this in any way possible? Or is there another solution for my problem?
Regards,
Matthijs
Create and install a Windows Service to do the actual work. This service will not require a logged on user and by definition only runs with once instance at a time, so this solves all of your problems.
Then let the UI communicate with the service through IPC and let the UI application start upon logon.
You can alternatively of course just let the user autologon, put a shortcut to the program in the startup folder and call the LockWorkStation() function after your application starts, but I would not take nor recommend that approach as it has security issues.
you can automatically login to a user account at startup with this :
http://technet.microsoft.com/en-us/magazine/ee872306.aspx
Click Start, type netplwiz, and then press Enter.
In the User Accounts dialog box, click the account you want to automatically log on to.If it is available, clear the Users Must Enter A User Name And Password To Use This Computer check box.
Click OK.
In the Automatically Log On dialog box, enter the user’s password twice and click OK.
The next time you restart the computer, it will automatically log on with the local user account you selected.
Automatic Windows logon as a predefined user is a convenient feature for single-user machines or home computers. This removes the hassle of unnecessary repetitive password entering in a secure environment and speeds up Windows startup and user profile warmup.
Howsoever, please do never forget that this is a kind of a security breach and should never be applied on computers, which could fall into hostile hands.
A detailed explanation of the procedure, without messing-up with the Windows registry, is available HERE.