I am not able to get this to work
call \"%MSDeployPath%msdeploy\" -verb:sync -source:runCommand=\'backup.bat param1\' -dest:auto,computername=10.xx.xx.xx,use
Edit You are right, the documentation states that cmd/bat files will be streamed to the destination.
It seems to me that it's simply a limitation of the feature that it can't accept arguments. It shouldn't be too difficult to create a modified version of the batch file at deploy-time with the settings hardcoded.
Something like:
REM Start of prepended script
SET SCRIPT_USERNAME=ThatGuy
REM End of prepended script
IF ("%SCRIPT_USERNAME%" == "") SET SCRIPT_USERNAME=%1
Update Having browsed the reflected source (ahem) of msdeploy, I can confirm that it's simply the way it's current designed. It determines whether to upload the file based on whether the entire path represents a file. Since adding arguments will prevent it resolving the path to a file, it doesn't upload anything.