Shutting Down All Processes Of Certain User
Sep 25, 2010I need an example code which shuts down all processes of a certain user and where some processes can be excluded.
View 11 RepliesI need an example code which shuts down all processes of a certain user and where some processes can be excluded.
View 11 RepliesDim Process As New Process()
Dim Count As Integer = 0
For Each Process In Process.GetProcesses(My.Computer.Name)
[code].....
I have that currently. What I want is instead of it loading ALL processes, I only want it to load processes from the current user. (ie. Ryan or Andrew, not SYSTEM or LOCAL.)'ve done research on Google looking how to implement and I've gotten some code on how to retrieve a User Name of the current user but nothing prevailed for what I needed :[ Any ideas? I'm noobish, taking Computer Science in Fall so I'm preparing and still learning.
I have populated a ListView with currently running processes and with the help of JMC, been able to highlight specific rows based on memory consumption. However, I've decided to change it up a little bit and change the color of rows based on whether the process is owned by the User, if it's a System process, or if is a Service. I've already been able to determine if the process is a User process by utilizing the OpenProcessToken.
[Code]...
My app is a tray icon which scans the Outlook Inbox periodically. It seems, from testing in my VMWare WinXP machine, that the app stops Windows from shutting down. I press StartShutdown but nothing happens. I have to exit the app first then StartShutdown will shutdown the PC.
[Code]...
I am using WM_QUERYENDSESSION to detect Windows shutting down in my vb.net app, but the complexity is that I need to quickly load a console application during this code to do some cleanup. It is looking like the console
application is not even loading, even though I can cause delays in the vb.net code. Is there a way to do this?
I have a program with the line process.start("shutdown", "-s -f -t 00") However, when it's executed, everything exits, and the logging off text appears, then the screen blackens out and there's only the mouse pointer. Nothing can be done like opening the task manager, I just have to shut it down using the main button, holding it for 7 sec.
View 12 RepliesIm trying to shut down the other PC on my local network through VB.net.. But whenever I run it.. It always says " CANNOT CREATE ACTIVEX ".. How can i solved this problem? By the way im using Windows XP..
Dim strComputer
Do
strComputer = InputBox("Please enter the computer name you want to reboot", "Input")
[code].....
I have a windows forms application that has no form and it runs in the background. It using a webbrowser control to get information off the internet.The program is that when I add the event handler:webbrowser.documentcompleted the program just shuts down. If i put a message box after the event handler then it works just fine because the webrowser has time to load the document. How can I do some like console.readkey that you would do in a console application?
View 11 RepliesI have written an application that sits in the systray and monitors a database for me. The problem is that this application is stopping some of my clients computers from shutting down, I assume because the app is still running when the computer is trying to shut down.
What I need to know is if there is a way that my application can tell when the computer is shutting down, so that I can close my application and therefore allow the computer to shut down.
I am only running my app on Windows O/S e.g. 2000, XP The application is written in VS 2005, .NET 2 and VB.Net language
I was in correspondence with someone using my program and he verified that on his system, XP won't shutdown/restart either if my program is running.
Basically what happens is when XP gets to my program in the shutdown process to terminate it, the whole shutdown/restart just stops. I have to exit my program, then start the shutdown again.
The person sent me an image of some threads that were still running after the shutdown process halted and I was curious if anyone might be able to shed some light on this info and what to do about these threads.
These are the threads that are running and what they do: mscoree.dll - a module containing the .NET Framework functions. mscorwks.dll - Microsoft .NET Runtime Common Language Runtime gdiplus.dll - contains libraries for the GDI graphics interface.
pls. I am currently developing a project to monitor client system from the server using Visual Basic 6. my question is How can i list the entire client on the network and possible track each actions on every system and possible shutdown/restart the client remotely from the server
View 3 RepliesI've build a vb.net windows service which does nothing but ping a wcf webservice and handles sending a maintenance request to this same webservice at night time. It does both tasks using a timer event. If the service does nothing but these two things it says at startup that it's shutting down cause of being idle. The windows service thread needs something todo.[code]....
View 2 RepliesIt all works fine it looks like this:Now thats enough for me but as many other users we have a problem of lack of knowledge when it comes to this:Windows is shutting down, the confirmation box appears and stops the windows from shutting down...This is unnaceptable imho and im trying to find a easy way to detect if windows is shuting down, or in other words if its NOT.So i put a: if windows isnot Shutting down then'all the other code in mybase.closingEnd ifIs such thing doable? all ive found was pages and pages of codes (something to do with api) and some outdated vb6 code...
View 3 RepliesI wrote a program that is a system tray app that has no user interface. The issue is that when you shutdown, log off, or restart the PC the app does not shutdown and the user has the "End Now" message box pop up.
The only thing running on this app is that it is listening to a port for communication.
I do not have any code in the form closing event as that is what I want just to close.
We have a windows services created in .Net and it was working well. Suddenly it created the attached error and it shuts down the system. We are writing log files also and No error found in log file also
View 3 RepliesHow do i make it so when you press a button, it shuts down your computer. I am wanting to make a menu for logging off, restarting, and shutting down.
View 9 RepliesI currently have the following up in VS 2010
Dim myProcess() As Process = System.Diagnostics.Process.GetProcessesByName("calc")
For Each myKill As Process In myProcess
myKill.Kill()
However I cannot seem to get it to kill more than one process. Example I've tried
("calc",mspaint")
("calc,mspaint")
("calc"),("mspaint")
For some time ago i have notice that my App on every start make a call to csc.exe and starts it. I know for sure that that did not happened before and I can not find out why this is happening now, or better to say: what did I do in code to make this happened? I have google-it and found out that csc.exe is some kind off on-the-fly compiler for C# (If I understand it correctly ) but my App is in VB.net so I am a bit confused. Can someone explain it to me in general what have I did in my VB.NET code to make my App on every start calls csc.exe?
View 17 Repliesim making a task manager and want to get cpu usage of a process this is how my code looks now
For Each proc As System.Diagnostics.Process In pList
Dim lstStuff As ListViewItem = New ListViewItem()
lstStuff.Text = proc.Id.ToString
[code]....
everything works but the cpu part it returns values over 100%?
is there a way to only get the processes that are shown in taskmgr?
The reason for this is because taskmgr hides some task on vista because you have to be admin to see all of it.
i have a small issue while developing a windows application using VB.Net . i will explain the scenario here. My application contains one form which has two tab buttons. say tab1 and tab2. In tab1, i have an option to download data from various sites. this takes few minutes. lets say 15 minutes. and in tab2 i have an option to view the logs. my problem is i am unable to click the tab2 unless and untill the downloading finish. my doubt is how to do more than processes at the same time. if i am right we need to use threading concept here.
View 1 RepliesI have a need to search for a specific process in task manager and attach (dock) my application to the window for that process. I have this working just fine. The problem I'm having is that sometimes this process may be running more than once (for example: running two Internet Explorers would put two iexplore.exe entries in Task Manager).
Is there a way to get the one that was opened first? I'm not sure how they get "sorted" in the Process list, but currently I am retrieving the first occurrence of the process and docking to it, but I'm finding that it isn't always the correct one. How can I make it always dock to the process entry that was opened first?
[Code]...
I'm building my first application in VB2010, this application consists of running 3 different programs; one after the other. I use a progress bar for task progress. My question is on how to make the application go to the next program after finishing with the previous one? Here is some of the code:
Private Sub Timer1_Tick_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
ProgressBar1.Increment(1)
If ProgressBar1.Value = 3 Then
[code]....
I'm working on a Parental control
I have 3 questions:
1) How to detect a starting process -
Solved here
2) How to capture a copy of the process and look in all controls from all forms to see if the Text/Items property has offensive keywords
3) If yes, how to close them immediately. - myProcess.kill
Write your code as efficient as you can to reduce CPU load, to consume less energy and protect our planet from global warming.
I have done a lot of searching and cannot find a solution to my problem of, my application appearing in the processes even after exit.
Note: It doesnt appear in the processes due to the type of exit i have used after the click function happens.
Public Class FCAM
Public Sub Launch(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Launch_FCAM_FarCry.Click
Process.Start("....Bin32FarCry.exe", "-MOD:FCAM")
System.Windows.Forms.Application.Exit()
[code]....
i make a kid protect app where the parrents can add a process name to listbox and it will block the process by process kill
View 2 RepliesI am trying to check for certain processes that is running and then inform the user of those processes via textbox like "The programs; -name of the processes running goes here- are running". [code]
View 2 RepliesDLLs made with VB.Net are different from DLLs made from other ways (i.e. with VB6). I wasn't albe to understand the cause. It might .NET has a bug.[code]...
View 1 Repliesi am trying to develop a program that will get all the processes in the task manager and from there, i'll get a specific application so that i will restart it. the problem is this:
I can call that specific application yet before restarting it i shall manipulate it's pause button before i can actually kill it,.HOw do i "click" the pause button on the called application? Can you help me with the code that i need to use?
Trying to dim a certain amount of process (determined by Environment.ProcessorCount) to run several processes which do not support multi-threading. I have already Dim'd proinf(6) as Process.ProcessStartInfo because I have designed a queue for the processes and this encounters no errors.
View 1 Replies