Hi,
I'm trying to intercept calls to a .exe to trace them (legit as my company wrote the .exe) as part of debugging, and I've suceeded in writing a short .bat file which does what I want after renaming the original command with -ORIG.
the-command.bat
@echo off
echo .|time >> logfile.txt
echo %0 %* >> logfile.txt
the-command-ORIG.exe %*
The problem is that the customer's program is expecting to call the-command.exe not the-command.bat.
I tried renaming the .bat file, but then it won't execute.
I tried creating a shortcut with .exe extension to the .bat but that didn't work either.
Is there a compiler I could use to convert it from .bat to .exe?
or do I need to write a one-line program to call the .bat and compile it?
or would it be a whole lot easier to write a C program to do the tracing instead?