According to
What is xxcopysu.exe? the file with name
xxcopysu.exe in
System32 directory of Windows is malware and should be removed. If this executable is from Pixelab, Inc., it should be in the program files folder of the Pixelab application and not in system directory of Windows.
However, if you are 100% sure that the file
xxcopysu.exe in
%SystemRoot%\System32 is not malware, your Windows is most likely a 64-bit Windows.
This means that there are
two System32 directories and one alias as it can be read on Microsoft page
File System Redirector.
%SystemRoot%\System32 or
%windir%\System32 is for 64-bit applications on Windows x64.
%SystemRoot%\SysWOW64 or
%windir%\SysWOW64 is for 32-bit applications on Windows x64.
This directory is the directory
%SystemRoot%\System32 for 32-bit applications like UEDOS32.exe used to run a user tool.
So if a 64-bit
xxcopysu.exe exists in
%SystemRoot%\System32, but no 32-bit
xxcopysu.exe in
%SystemRoot%\SysWOW64, you need to use the alias
%SystemRoot%\Sysnative as Microsoft wrote.
A batch file is processed using either 64-bit
cmd.exe or 32-bit
cmd.exe depending on parent application.
You could use following code in your batch file:
Code: Select all
set "SystemPath=%SystemRoot%\System32"
if exist "%SystemRoot%\Sysnative\*.exe" set "SystemPath=%SystemRoot%\Sysnative"
%SystemPath%\xxcopysu.exe
For 64-bit applications the alias
Sysnative does not exist and therefore the batch file can find out by itself if being processed from 32-bit or 64-bit
cmd.exe to run the application with correct path.
Note:
Sysnative is an alias of file system redirector. It is not a directory or a symbol link. Therefore it is not possible to check if
%SystemRoot%\Sysnative exists, it is only possible to check if there is a file in
%SystemRoot%\Sysnative as done in code above.
Well,
xxcopy is available as 32-bit and as 64-bit console application. Copying 64-bit version into
%SystemRoot%\System32 and 32-bit version into
%SystemRoot%\SysWOW64 would avoid the need of the two additional lines in batch file.