Page 1 of 1

qprocess.exe not recognized

Posted: 26 Mar 2018 21:04
by Tom_B
Win7. In XY, I start a batch file by double-clicking it. The batch file contains qprocess.exe. It fails with 'qprocess.exe' is not recognized as internal or external command, operable program or batch file.

If I start the same batch file from Explorer, qprocess.exe executes normally.

The batch file also contains timeout.exe; this works in XY or Explorer.
timeout.exe is in \windows\system32 and in \windows\sysWOW64.
qprocess.exe is only in \windows\system32, so that may explain something, but path includes \windows\system32.
Even if I use C:\windows\system32\qprocess.exe it still fails the same way if started in XY.

My expectation is for the batch to run the same whether started in XY or Explorer.

Re: qprocess.exe not recognized

Posted: 26 Mar 2018 21:33
by highend
XY is a 32-bit process and the command prompt inherits this environment
Accessing %windir%\System32 redirects to %windir%\SysWOW64

So you could probably add that to your path or look up how to enable the redirection
using C:\Windows\Sysnative (WOW64 Redirection in the help file)

This is not a bug, this is how 32 bit apps under a 64 bit OS behave...

Re: qprocess.exe not recognized

Posted: 28 Mar 2018 00:49
by Tom_B
Thanks highend, :tup:

Using %windir%\sysnative\qprocess.exe works. I was unfamiliar with sysnative and didn't realize that Windows redirects system32 to syswow64 even when system32 is explicitly used.

I don't understand why sysnative is not a system variable nor why a sysnative folder is not seen in XY . Also don't see why Microsoft does not provide a 32-bit version of qprocess.exe, since 32-bit Windows exists.