win32 hardlinks and process name

113 views Asked by At

I'm a tester and have hundreds of versions of the same program to test.

To avoid copying certain executables I store them as prog.exe.1 prog.exe.2 etc. then the script create a hardlink prog.exe (mklink /H .. or fsutil hardlink create prog.exe prog.exe.1) to all exe in the loop and start. This is much faster than copying (actually there are more files)

In most cases the started exe is visible in the Task Viewer as prog.exe. The problem is that sometimes it is visible as prog.exe.1 (2, 3, or 124...) and this breaks everything...

Good output (when prog.exe is displayed) of fsutil hardlink list prog.exe is:

\Program Files\prog\prog.exe.1
\Program Files\prog\prog.exe

Bad output (when prog.exe.1 is displayed):

\Program Files\prog\prog.exe
\Program Files\prog\prog.exe.1

Question: how to have it always visible as prog.exe in the Task viewer without copying? Soft links are always visible as targets (prog.exe.1...)

0

There are 0 answers