lukekim Thanks for the new version of PsExec... unfortunately it brakes the possibility to execute 2 or more concurrent PsExec to the same host.
Based on the mentioned PSEXEC-.key file what I think is that it is not honoring the -r option and adjusting the name based on it so 2 process could be executed simultaneously.
Doesn't matter if we use the 32 or 64 bits version as you will see.
This is an example with 2.30:
Cmd 1:
D:\PSTools-2.30>PsExec.exe -accepteula -r PEXEC1 -i 1 -w . cmd /s /c "pause"
PsExec v2.30 - Execute processes remotely
Copyright (C) 2001-2021 Mark Russinovich
Sysinternals - www.sysinternals.com
cmd exited on HOSTNAME with error code 0.
D:\PSTools-2.30>PsExec64.exe -accepteula -r PEXEC1 -i 1 -w . cmd /s /c "pause"
PsExec v2.30 - Execute processes remotely
Copyright (C) 2001-2021 Mark Russinovich
Sysinternals - www.sysinternals.com
cmd exited on HOSTNAME with error code 0.
D:\PSTools-2.30>
Cmd 2:
D:\PSTools-2.30>PsExec.exe -accepteula -r PEXEC2 -i 1 -w . cmd /s /c "echo Hello World 2"
PsExec v2.30 - Execute processes remotely
Copyright (C) 2001-2021 Mark Russinovich
Sysinternals - www.sysinternals.com
Error creating key file on HOSTNAME:
The process cannot access the file because it is being used by another process.
D:\PSTools-2.30>PsExec64.exe -accepteula -r PEXEC2 -i 1 -w . cmd /s /c "echo Hello World 2"
PsExec v2.30 - Execute processes remotely
Copyright (C) 2001-2021 Mark Russinovich
Sysinternals - www.sysinternals.com
Error creating key file on HOSTNAME:
The process cannot access the file because it is being used by another process.
D:\PSTools-2.30>
See the error on these cases
With 2.2 there is no such problem. See:
Cmd 1:
D:\PSTools-2.2>PsExec.exe -accepteula -r PEXEC1 -i 1 -w . cmd /s /c "pause"
PsExec v2.2 - Execute processes remotely
Copyright (C) 2001-2016 Mark Russinovich
Sysinternals - www.sysinternals.com
cmd exited on HOSTNAME with error code 0.
D:\PSTools-2.2>PsExec64.exe -accepteula -r PEXEC1 -i 1 -w . cmd /s /c "pause"
PsExec v2.2 - Execute processes remotely
Copyright (C) 2001-2016 Mark Russinovich
Sysinternals - www.sysinternals.com
cmd exited on HOSTNAME with error code 0.
D:\PSTools-2.2>
Cmd 2:
D:\PSTools-2.2>PsExec.exe -accepteula -r PEXEC2 -i 1 -w . cmd /s /c "echo Hello World 2"
PsExec v2.2 - Execute processes remotely
Copyright (C) 2001-2016 Mark Russinovich
Sysinternals - www.sysinternals.com
cmd exited on HOSTNAME with error code 0.
D:\PSTools-2.2>PsExec64.exe -accepteula -r PEXEC2 -i 1 -w . cmd /s /c "echo Hello World 2"
PsExec v2.2 - Execute processes remotely
Copyright (C) 2001-2016 Mark Russinovich
Sysinternals - www.sysinternals.com
cmd exited on HOSTNAME with error code 0.
D:\PSTools-2.2>