views:

472

answers:

3

Is there any way to start foobar.js WSH-script in order that standard Task Manager will display a script process name as foobar.something and not as "wscript.exe"?

Thanks in advance.

+1  A: 

Standard Task Manager? not that I know of. But if you are ready to switch to Process Explorer instead, selecting a Command Line display column will clearly show foobar.js .

gimel
A: 

No. Task Manager shows actual process objects. A .js file will never be a process object.

The WScript object managed by the windows scripting host does not appear to expose the application title either.

Christopher
A: 

I'll be surprised if you can change the name associated with a process in task manager. But if your goal is to identify the process programatically, you can use the process ID (PID). You can add a column to the task manager view that will display this information or you can get the ID of processed spawned from within WSH using the following property:

http://msdn.microsoft.com/en-us/library/x78640t0(VS.85).aspx

steamer25