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

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
« Next Oldest Return to Top Next Newest »

Messages In This Thread
HELP REQUEST check if an exe is running - by lovefallen on 06-17-2007 at 07:34 PM
RE: HELP REQUEST check if an exe is running - by matty on 06-18-2007 at 02:08 PM
RE: HELP REQUEST check if an exe is running - by Voldemort on 06-18-2007 at 03:45 PM
RE: HELP REQUEST check if an exe is running - by deAd on 06-18-2007 at 04:21 PM
RE: HELP REQUEST check if an exe is running - by matty on 06-18-2007 at 04:21 PM
RE: RE: HELP REQUEST check if an exe is running - by deAd on 06-18-2007 at 04:40 PM
RE: HELP REQUEST check if an exe is running - by CookieRevised on 06-18-2007 at 05:03 PM
RE: HELP REQUEST check if an exe is running - by Eljay on 06-18-2007 at 05:09 PM
RE: HELP REQUEST check if an exe is running - by lovefallen on 06-20-2007 at 06:46 PM
RE: HELP REQUEST check if an exe is running - by lovefallen on 06-22-2007 at 11:13 PM
RE: HELP REQUEST check if an exe is running - by cooldude_i06 on 06-23-2007 at 04:36 AM
RE: HELP REQUEST check if an exe is running - by lovefallen on 06-24-2007 at 02:11 PM


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