Yeah your batch file is diff. Remove the quotes from your change directory command and script home location values.
@echo off
clsset rSource=%1
set rTarget=%2set gxpsLocation=C:\Program Files (x86)\SambaPOS5\Reports\gxps\
:: Delete previous rTarget
if exist %rTarget% del %rTarget%C:
CD
CD %gxpsLocation%
gxpswin64.exe -sDEVICE=pdfwrite -sOutputFile=%rTarget% -dNOPAUSE %rSource%