Good morning Nasir,
Some questions:
- What sets %destination% in the batch file?
- When batch file is called, how do you know where current directory is?
- is "Parm1" a literal in the batch file, or is it supposed to come from the command line when calling the batch file?
example:
.bat contents
@echo off
setlocal
if not defined destination set destination=.
start ""%destination%\abc.exe" %*
endlocal
Setlocal keeps changes to batch environment from affecting anything outside the batch file (like possibly overwriting preset environment vars).
If destination environment var is not set, temporarily set it to current directory ".". Exe will be run from whatever directory is "current" when batch file is run.
%* means "include entire command line verbatim". This means you won't need to modify the batch file if you add any new args to your application.
Endlocal is not strictly necessary here, but returning everything to "normal" during run of a batch is good form.