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 4 years ago.
Improve this question
I have created a windows service that checks a new release of an application. And if there is a new release then it will show an alert or message to the user saying that "A new release is available. Do you want to install it?".
My service is ready but I am not able to show this message to the user from Windows Service.
TL;DR: you cannot.
Longer version: a few years ago the use of highly privileged processes (services showing UI) opened up vulnerabilities where user processes could be elevated to gain those higher privileges. Therefore the capability was blocked.
Instead you need a completely separate user process to provide the UI and some form of inter-process communication (like a named pipe with a carefully chosen ACL) to connect to the service. This also allows you to handle the case where no one (via make the connection work across the network) or multiple users are logged in (and none on the console).
Related
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
I've created a simple application in C# which purpose is to have a Windows Service running on Background in the whole time the computer is alive and which I know is a non-GUI process.
I want the Service to execute some command like, programmatically lock the computer, send data to one of my Windows Form Application, show Windows Form Application etc. which will not work because it is Windows Service. I found it really hard for me to work with this.
Now, my question is, is there any alternative way for what I want to achieve?
I mean other solution for running background process in the whole time and do the GUI job?
I am really out of ideas, anyone can suggest/help will be very appreciated!
You can always write a winforms application that will run a background thread listening for commands and executing tasks. Then all you need to do is register this executable to be started when a session is started. The application could be minimized to the tray so that the user could still manipulate it.
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'd like to create a Skype application that displays to the other end of the call one of my windows, rather than what my camera sees. I'd like to select which window and even switch between windows on my machine. I have looked at the API, but there's a good deal there I don't understand. Was wondering if this is possible?
Skype itself does not provide too many options for its automation. Some program API was announced in the Skype site, but is not yet available (at least for ordinary users). The only Skype API I found was the Skype4COM.dll in-process COM object. Skype4COM permits operations like management of Skype user accounts, calls, etc. But most Skype settings are not addressed, and screen sharing is left completely out of its scope. Other automation techniques should be combined with Skype4COM to achieve active screen sharing.
For better understanding Remote Desktop Control with Automated Skype might give some idea.
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'm refactoring an application used by the employees of an insurance carrier, they have had some problems with some kind of malware on their computers that was controlling this application to do bad things, or at least that's what they say.
I'm pretty sure the malware is using the Win API to make calls to the application instance, so my question is, there's any way to detect if a real user is controlling the application or it's being controlled by another process through calls to the Win API? The app is coded in C#.
This answer is coming from my experience with developing Win32 apps using C++.
I can only think of two ways in which the app is being controlled -- one using OLE automation, using automation verbs and secondly inserting keyboard/mouse events into the system event queue. (I'm assuming that this app is not listening for any network originated commands). You can verify the first by checking the source code and using a debugger with some OutputDebugString calls. The second can only be detected by a malware scanner. Any COTS/free AV or MS security essentials should be able to identify a malware, unless of course it's written internally by a malicious employee.
Have you taken a look at the task manager process list and gone through them one-by-one to see if there's anything that looks suspicious? Can you run the app with elevated privileges? Then the OLE automation client, if one is present, won't be able to access the process.
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 9 years ago.
Improve this question
Can i restrict usage of an service user account to particular application by using any programming language? Means i created one service account with Domain administrator privilege to have a semantic backup or something, now how can i restrict users not use that service account for any other jobs/works. If any one uses that service account credential set i would like to have email intimation through any programming language.
You can be alerted when a logon-related event is recorded by attaching a "Send E-Mail" task to the event log of the DC. This way, when the server sees an authentication event coming in, it will e-mail you.
This page explains how to accomplish this step-by-step.
I'm not aware of any means of binding an account like you describe, but the easiest solution would be to prep some scheduled tasks running on that specific account, then keeping the credentials undisclosed to other people.
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 an Windows Application running on my PC , this application list all connected servers on our farm .
This application have manual process (more than one step ) to do one action per server ,,
The steps are as the following (These steps are done for each one of the servers listed) :
Select one server then click right on the mouse then choose one option.
The selected option will open a new window above the parent application window.
Then click on button.
What I need is to build a new C# application that acts/simulate as the above application with ability to do that action automatic for all select servers from the list ..
I hope its clear now ,,
Please help me ..
If the application you want to attach has a UI, You can use UI Automation and Win32 API to manipulate some functinallity.
Try this starting points:
How to I get the window handle by giving the process name that is running?
Get the handle of a window with not fully known title. (C#)
http://www.csharphelp.com/2006/08/get-current-window-handle-and-caption-with-windows-api-in-c/
using C# and UI Automation to grab contents of unknown control-type
Good luck