title: Run exe from bat file with command line arguments
body: <p>I am building an install package and have a install directory , (obviously could change if user needed/wanted). in a subdir in the root install dir is a bat file that copies files , then runs a program , then runs another program. it currently looks like this.</p>
  
  <pre><code>@echo off
  xcopy %~d0\dir-files\record\*.* "%~dp0input" /Y
  10th-f-Downsampling.exe start /wait
  
  cd..
  start Dashboard.exe 
  </code></pre>
  
  <p>the problem is that i need to add command line argument to the downsampling exe --max_old_space_size=3000   </p>
  
  <p>problem is in order to do this (under my current understanding of bat files which is limited) is to create a shortcut and input the command line argument in the usual windows shortcut way.  I can't create a relative shortcut and am not sure how best to do this.  any ideas anyone ? </p>
  
  <p>Ok so i have so far managed to create a bat file that creates a shortcut in the same dir using this script ....</p>
  
  <pre><code>@echo off
  
  set SCRIPT="%TEMP%\%RANDOM%-%RANDOM%-%RANDOM%-%RANDOM%.vbs"
  
  echo Set oWS = WScript.CreateObject("WScript.Shell") &gt;&gt; %SCRIPT%
  echo sLinkFile = "ShortcutName.lnk" &gt;&gt; %SCRIPT%
  echo Set oLink = oWS.CreateShortcut(sLinkFile) &gt;&gt; %SCRIPT%
  echo oLink.TargetPath = "MyApp.exe" &gt;&gt; %SCRIPT%
  echo oLink.WorkingDirectory ="" &gt;&gt; %SCRIPT%
  echo oLink.Save &gt;&gt; %SCRIPT%
  
  cscript /nologo %SCRIPT%
  
  del %SCRIPT%
  </code></pre>
  
  <p>however I am not sure how to include the command line arguments into this file... if someone could give a thought that would be amazing.</p>