rbennett806
Posts: 885
Score: 18 Joined: 6/14/2006 Status: offline
|
I'd suggest thinking about checking for the process instead of the actual window title if possible. I've run into things in the past assuming that the window will always be titled the same, and then things change and my code bombs. So would something like this work: strProgramProcess = "notepad.exe" Set colProcessList = objWMI.ExecQuery ("Select * from Win32_Process Where Name = '" & strProgramProcess & "'") If Not colProcessList.Count = 0 Then 'The .EXE is running. End If Of course, that's just a snippet of code and not the whole script....
|