What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » HELP REQUEST check if an exe is running

Pages: (2): « First « 1 [ 2 ] Last »
HELP REQUEST check if an exe is running
Author: Message:
cooldude_i06
Full Member
***

Avatar
I'm so cool I worry myself.

Posts: 272
Reputation: 9
– / Male / –
Joined: Sep 2003
RE: HELP REQUEST check if an exe is running
Well Cookie answered your question about restarting a script. About checking if the exe is running, here is the function that I am using for my script IPGet.

code:
function checkProcess(strProcessCaption){
        var wbemFlagReturnImmediately = 0x10;
        var wbemFlagForwardOnly = 0x20;

        var objWMIService = GetObject("winmgmts:\\\\.\\root\\CIMV2");
        var colItems = objWMIService.ExecQuery("SELECT * FROM Win32_Process", "WQL",
                                          wbemFlagReturnImmediately | wbemFlagForwardOnly);
        var enumItems = new Enumerator(colItems);
        for (; !enumItems.atEnd(); enumItems.moveNext()) {
                var objItem = enumItems.item();
                if(strProcessCaption == objItem.Caption) return true;
        }
        return false;
}

[Image: clb2.jpg]
06-23-2007 04:36 AM
Profile E-Mail PM Web Find Quote Report
lovefallen
Junior Member
**


Posts: 43
– / Male / Flag
Joined: Nov 2006
O.P. RE: HELP REQUEST check if an exe is running
thanks to everyone especially CookieRevised and cooldude, I'll try to turn your suggestions into something working!
[Image: signatureoo2.png]
06-24-2007 02:11 PM
Profile E-Mail PM Find Quote Report
Pages: (2): « First « 1 [ 2 ] Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On