User to user discussion and support for UltraEdit, UEStudio, UltraCompare, and other IDM applications.

Help with setting up and configuring custom user tools in UltraEdit (based on command line input)
2 posts Page 1 of 1
I am working on a batch file which calls xxcopysu.exe, a program in my WINDOWS\System32 folder. The batch file works with no problem if I run it in a DOS box.

But when I make a tool to run it, I get the message:

'xxcopysu' is not recognized as an internal or external command,
operable program or batch file.

I get this message even if the batch file called by the tool has the single line "xxcopysu".

The program is there. I can run it either in a DOS box or from a batch file in a DOS box.

I am running Uedit v 22 under Windows 10.

Any idea what the problem might be?

Thanks
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 2 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.
Best regards from Austria
2 posts Page 1 of 1
cron