Login | |
|
 |
RE: How to get the name of an application with VBScript - 6/27/2008 1:49:30 PM
|
|
 |
|
| |
Rischip
Posts: 462
Score: 2
Joined: 3/26/2007
Status: offline
|
In the case of your example, firefox.exe is both the program name and process name. Mozilla Firefox is maybe the common name used by people, and definately the window title, but it's not the actual program name. So is it the Window title you are looking for?
_____________________________
Rischip Author of - The Grim Linker
|
|
| |
|
|
|
 |
RE: How to get the name of an application with VBScript - 6/30/2008 12:37:00 AM
|
|
 |
|
| |
Rischip
Posts: 462
Score: 2
Joined: 3/26/2007
Status: offline
|
Like DM said, if you have Word you can do this Set Word = CreateObject("word.application") For Each x In Word.Tasks wscript.echo x.Name Next Word.Quit Set Word = Nothing
_____________________________
Rischip Author of - The Grim Linker
|
|
| |
|
|
|
 |
RE: How to get the name of an application with VBScript - 7/2/2008 1:50:34 AM
|
|
 |
|
| |
Rischip
Posts: 462
Score: 2
Joined: 3/26/2007
Status: offline
|
I almost forgot another way to do it, which is part of XP, but not part of vbscript would be to shell [.RUN|.Exec] "Tasklist /FI ""WINDOWTITLE eq <WindowTitle>""" You'll get something like this as output.\/ Using .Exec you can pipe that into your script using STDOUT.read C:\>tasklist /FI "WINDOWTITLE eq VBScript Forum - Mozilla FireFox" Image Name PID Session Name Session# Mem Usage ========================= ====== ================ ======== ============ firefox.exe 3384 Console 0 121,412 K
_____________________________
Rischip Author of - The Grim Linker
|
|
| |
|
|
|
|
|