Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
In C#, how to check programatically if the current user is in Windows 'Disconnected' state?
Background: On a server, I would like all instances of my program to selv-terminate if the current user is disconnected.
The program is not running in elevated state, i.e. not as administrator.
You will have to override WndProc to hook into the Windows System Messages. This will not be possible if you're in a console app.
see: Detect Active RDP sessions
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 days ago.
Improve this question
I have web app on Azure.
Suppose my application has entered a method that performs something. I can't get out of it.
When I close the web app on azura and turn it on, the app returns to the same point (method).
Can I somehow reset it and stop the execution of all methods?
Best regards
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
How can i start an app when user logs on first time on a machine? I need to write an app which assists the user for example configuring other software, printer etc. What i need to ensure is, that this app starts when a user first logs into this machine.
How can I achieve this?
(If it helps, I only need to support Windows 10.)
Make an auxiliar process that starts your app when the computer starts. You can refer this one...
How to run a C# application at Windows startup?
then make a value at your db, for example firstLogin and changed to 0 for this user when your app is running.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
is it possible to create a permanent notification at the notification bar in Windows 10?
Also it is necessary to do this in a windows form application and not an universal windows app.
Thanks for you help.
To do it in a WinForms app you'll need to use the desktop bridge to create the notifications.
It's not possible to have a toast that can't be dismissed from the action centre (which is what I assume you mean by "notifications area") but you can detect when it's removed and then add another back in. There are already a number of apps which do this as a way of having "permanent notifications".
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have one little windows form program with 2 buttons , the objective is to open executables , i did it already , yet i want the program to login with my credencials in those executables , accessing to a file where my user id and password is and then writing it in the login box .
Thanks
If the other program doesn't accept login credentials on their command line then consider using SendKeys to send the keystrokes directly. Check out this answer: C# using Sendkey function to send a key to another application
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I have a little problem.The Device Manager is a list of processes. The process my application is active on my user (FoX0X). How to change the process to belong to the system (Replace "FoX0X" to "SYSTEM")? Besides that if you can not close it in the device manager?
I tried to use the code:
File.SetAttributes("AppName", FileAttributes.System);
But this dont work.
You can not change users a process is running under, you may be able to do impersonation to run a section of code as another user, but you can not modify the process itself to be running as another user.
To make your process run as SYSTEM it must be started under that user.