Page 1 of 1

Opening Task Manager

Posted: 20 May 2022 10:34
by XY fan
Could someone give me a script to open the Task Manager with a button I will put on the Toolbar. Assuming this is possible - I am still educating myself about scripts!

Re: Opening Task Manager

Posted: 20 May 2022 10:46
by highend
And you can't google how to run the taskmgr and the run command from the help?

Re: Opening Task Manager

Posted: 20 May 2022 10:52
by Horst
That would be a rather unnecessary button or script
as there enough Windows ways to invoke the Taskmanager.

Ctrl + Shift + Esc
Right click on the taskbar

If you insist of a button add for example for the Left click of a button
run "Taskmgr.exe";

Re: Opening Task Manager

Posted: 20 May 2022 12:34
by XY fan
Thanks - that works just fine.

The script starts the Task Manager in a small windows - if I want it to start up Maximised do I just add /M or ....

Re: Opening Task Manager

Posted: 20 May 2022 14:29
by XY fan
I decided I would rather run Sysinternals Process Explorer from the button so now need a script to do that.

I have got as far as -

run "C:\Program Files\Power Toys\Process Explorer\program\procexp64.exe"; - which is the correct path to where I have put the executable.

but which does not work. What am I missing - I have read the Help file!

Re: Opening Task Manager

Posted: 20 May 2022 14:44
by highend
I have read the Help file!
No, you didn't.

That path contains spaces^^

Re: Opening Task Manager

Posted: 20 May 2022 14:50
by klownboy
Running "procexp64.exe" with run "D:\Tools\ProcessExplorer\procexp64.exe"; using my path to it works for me. Do you have that script line in the CTB "On left-click" or "On right-click" block?

As highend mentioned, your path/name has spaces, mine does not. Try run """C:\Program Files\Power Toys\Process Explorer\program\procexp64.exe""";

Re: Opening Task Manager

Posted: 20 May 2022 14:56
by XY fan
Thanks to both of you especially klownboy. The extra " works. But I still do not see where the spaces are/were!

Re: Opening Task Manager

Posted: 20 May 2022 15:03
by highend
???

Re: Opening Task Manager

Posted: 20 May 2022 16:50
by WirlyWirly
When using the run command, I find that passing your arguments through the lax() function reads a lot more natural.

run lax("C:\Path\to\file.exe" "flag1" "flag2");

Re: Opening Task Manager

Posted: 21 May 2022 02:45
by XY fan
WirlyWirly wrote: 20 May 2022 16:50 When using the run command, I find that passing your arguments through the lax() function reads a lot more natural.

run lax("C:\Path\to\file.exe" "flag1" "flag2");
Thanks - that works too

Re: Opening Task Manager

Posted: 21 May 2022 07:04
by highend
And runq works as well and in general, all correction quotings would have worked...