New desktop, need Explorer PID

May 20, 2008
Syracuse, NY, USA
Apparently, stuff in the "StartUp" folder runs when Explorer starts on a new desktop. I have a logon BTM there and want to suppress most of what it does. I already have a plugin _DESK so I can suppress stuff with
IF "%_DESK" NE "Default" ...

But one of the things I **want** to do requires the PID of Explorer. Since there are two Explorer's running, getting the right one is not trivial. I can squeeze it out of my WHICHWIN plugin (which doesn't see beyond its own desktop) by getting the PID of the process owning the window of class "Progman". And I suppose I could write a plugin that does the same thing more directly. Does anyone have any other ideas?

Does anyone have any other ideas?


Before starting the next desktop, I use TASKLIST to find the current PID of Explorer; thus;

tasklist explorer
2540  explorer          Program Manager

After creating a new desktop;

desktop /c jlc

TASKLIST gives me;

tasklist explorer
2540  explorer          Program Manager
2652  explorer

Not sure if this is what you are looking for, but it does give the required PID of the new Explorer.

Similar threads
Thread starter Title Forum Replies Date
E How to? Closing desktop created by DESKTOP command Support 10
Joe Caverly Problem creating and switching to a DESKTOP Support 9
R How to? Win 10 virtual desktops and DESKTOP Support 4
D Tcmd 22.00.42 - annoying desktop refresh Support 47
C TC rearranges my desktop! Support 57
P Desktop customization is ignored by v19 Support 5
S Documentation HELP Nit - Index - Desktop command Support 0
D How to? How do you uncreate a Desktop? Support 1
S DESKTOP - identify current active ? Support 4
vefatica (OT) Show desktop from command line? Support 20
vefatica Fixed DESKTOP, START? Support 0
vefatica START /DESKTOP="name with space" ... Support 4
vefatica DESKTOP /N? Support 0
vefatica New desktop and StartUp folder? Support 4
vefatica DESKTOP Support 7
vefatica START /DESKTOP Support 3
vefatica Running TCMD's help on the services desktop Support 0
C starting a shortcut from desktop Support 14
C Desktop Refresh? Support 5
S Desktop Shortcut Hotkey question Support 1
S Desktop hotkey creation using SHORTCUT command Support 4
vefatica Desktop/MyComputer Support 1
vefatica Need help with XML Support 3
MikeBaas How to? I need help with RD Support 5
D Need to set Take Command font size when switching to high DPI display Support 0
J Need activation help. Support 1
vefatica gcd() and lcm() ... need '%' Support 10
C Cmpr_Del.btm need help understanding UDF..... Support 2
C Touch command — I Need to touch matching files in another directory. Support 5
D I need a debug-plan Support 4
Frank How to? need help with "function" Support 10
R How to? i need a little help Support 3
B Need To Deactivate V12.1 Before Reinstall To Different Directory? Support 3
S Re: Release of new version - do we need to download again? Support 8
O Need 'grep' equivalent Support 13
S Need help to execute TCC commands on another system Support 6
vefatica What environment variables does IDE need? Support 3
T Expired trial...need to evaluate new build Support 1
H I need a little help. Support 4
C how to copy to folder where I need admin rights Support 5
M Need help Support 0
deleyd Need example of @COMPARE Support 1
P Need to use a regex in a "for" loop. Support 54
H New to TCC and I need assistance Support 8
thorntonpg file explorer - short cut keys Support 1
Jay Sage Issues With TCMD File Explorer Support 0
M WAD "Pictures" directory is empty in TCC but not in CMD or Explorer Support 4
G tcedit ist not run in tc 24 file explorer Support 10
J File explorer handling from command line? Support 2
J built in file explorer - how do i go back "up" the directory? Support 2

Similar threads