taskmanager

How can I keep Task Manager from killing my program?

余生长醉 提交于 2019-12-10 02:52:09
问题 Is there any way to protect my Delphi application from being killed by the Windows task manager (or others like Process Explorer)? I think Windows messages can do that (by doing a hook and intercepting the TerminateProcess message). I want an example of this protection. The Kaspersky Anti-Virus suites are like this; we can't end their process in Task Manager. 回答1: AV Programs like Kaspersky probably use a driver and use hook to prevent termination. In your situation I would advise to set an

Android: Re-invoke application if task manager kill

牧云@^-^@ 提交于 2019-12-09 06:15:48
问题 Application thread get close if its killed by task manager. Need to re-invoke application as though its killed by other application or task manager. Any idea? 回答1: You have to run background service with START_STICKY command. Just extends Service and override onCommand like this : @Override public int onStartCommand(Intent intent,int flags,int startId) { super.onStartCommand(intent, flags, startId); return START_STICKY; } Like this your Service is restart when it's close (by system or

Performance Counter read access very slow - How does Task Manager do it?

邮差的信 提交于 2019-12-08 12:12:57
问题 Im trying to implement a performance monitoring tool, I want to monitor basic things such as Memory and CPU. I am attempting to do so by using Performance Counters as I believe this is what Task Manager is using behind the scenes too. I have no idea how Task Manager is able to do this however as to me it seems to take a VERY long time to retrieve process data using this method: class Program { static void Main(string[] args) { while (true) { var pcs = Process.GetProcesses() .Select(p => new

C# - Disable Task manager error

邮差的信 提交于 2019-12-08 11:21:23
问题 The code is as follows: public void KillCtrlAltDelete() { RegistryKey regkey; string keyValueInt = "1"; string subKey = "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System"; try { regkey = Registry.CurrentUser.CreateSubKey(subKey); regkey.SetValue("DisableTaskMgr", keyValueInt); regkey.Close(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } } But I was getting the following error. System.UnauthorizedAccessException:Access to the registry key'HKEY_CURRENT_USER\Software

Running Powershell script as scheduled task

喜欢而已 提交于 2019-12-08 10:13:46
问题 I am using the powershell script below to open several word documents, update the form fields in them, and then close them. First, I'll note that if this script is run from the command line or by right clicking the file and selecting Run with Powershell basically doing it manually in any way, it will execute just fine. However, if I try to run this as a scheduled task, one of two things happen. I have tried several different forms of syntax for this, but all produce one of the same two

How can I get screenshot's from “Recent opened apps”?

北城以北 提交于 2019-12-08 08:12:33
问题 Is possible to get full app screenshot from "Recent opened apps"? I want to make MeeGo or Symbian similar task manager for Android. 回答1: I doubt this is possible without running on a rooted phone. The system recent tasks panel gets the thumbnails via this code: final ActivityManager am = (ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE); ActivityManager.TaskThumbnails thumbs = am.getTaskThumbnails(td.persistentTaskId); But it seems getTaskThumbnails is a private method and

How to set “run only if logged in” and “run as” with TaskScheduler in C#?

你。 提交于 2019-12-07 06:08:58
问题 I've got code that uses the C# TaskManager object to create a task. On Windows 7 it works fine but on Windows XP (and presumably other Windows) it doesn't work at all because the default user for the task is system and thus there's no session for the GUI to be displayed. If I modify the created task manually in the control panel widget to set the job to run only when user is logged in and only for the particular user, then everything works perfectly. But despite hours of searching I see no

How to detect program java force to close from Windows Task Manager?

假如想象 提交于 2019-12-07 02:02:37
问题 Guys sorry if I have offended someone by asking such a noob question, as I see someone have "Marked Down" Question for being inappropriate. This is my first time asking here so forgive me if something isn't appropriate, and sorry if my English isn't very good. I'm trying to create a temp file when my program had been closed via the task manager ... but i have no idea about how to detect if my program is closed via the task manager !!! How do I do that? I googled a lot, but either I used the

Hide android application in long-press-HOME-button-menu

╄→гoц情女王★ 提交于 2019-12-06 07:02:02
问题 I want to hide my android app from (and only from) the menu that appears when long holding the HOME-button after it is finished. Is there a way to do that? Calling finish() programatically dont do the trick. There are many threads about hiding an app from the launcher and taskmanager, but this is not what I want, I simply dont want it to show up in this "app history". best regards Sebastian 回答1: Add android:excludeFromRecents="true" to any <activity> element in the manifest for any activity

How to make Windows 8 desktop apps shown in Metro UI (like Task Manager)?

妖精的绣舞 提交于 2019-12-05 21:56:39
Recently I have noticed that Windows 8 Task Manager can be shown in Metro UI. The requirement is that you must set it always on top (through "Options -> Always on top" menu). After setting always on top, you can launch Task Manager in Desktop, switch to Metro, you can see that Task Manager is shown in Metro. Or you can directly launch Task Manager in Metro (by pressing Ctrl+Shift+Esc or Ctrl+Alt+Delete). I just wanna know how to achieve this in other apps? Other desktop apps don't have this behavior if they are always on top. Is Windows 8 Task Manager is a special app? Maybe it is a mixture of