title: How to execute python script in custom action using <binary sourcefile > in wix before installfiles
body: <p>I am using python script to execute in custom action in wix project.</p>
  
  <p>binary Id="python_script" SourceFile="myscript.py" </p>
  
  <p>Custom action as:</p>
  
  <blockquote>
    <p>CustomAction Id="CA_python_script" BinaryKey="python_script" Execute="immediate" Impersonate="yes" Return="check" ExeCommand="&quot;[COMMANDPROMPT]&quot; /c &quot;C:\Python26\python.exe myscript.py&quot;" </p>
  </blockquote>
  
  <p>I have also tried as:</p>
  
  <blockquote>
    <p>CustomAction Id="CA_python_script" BinaryKey="python_script" Execute="immediate" Impersonate="yes" Return="check" ExeCommand="&quot;[COMMANDPROMPT]&quot; /c &quot;C:\Python26\python.exe python_script&quot;" </p>
  </blockquote>
  
  <p>failed with errors:</p>
  
  <blockquote>
    <p>MSI (s) (40:14) [15:18:47:204]: Note: 1: 1721 2: CA_python_script 3: C:\Windows\Installer\MSI33F9.tmp 4: "C:\Windows\system32\cmd.exe" /c "C:\Python26\python.exe myscript.py" 
    Error 1721. There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: CA_python_script, location: C:\Windows\Installer\MSI33F9.tmp, command: "C:\Windows\system32\cmd.exe" /c "C:\Python26\python.exe myscript.py" 
    MSI (s) (40:14) [15:18:51:782]: Product: MY software -- Error 1721. There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: backup_Registry_Cmd, location: C:\Windows\Installer\MSI33F9.tmp, command: "C:\Windows\system32\cmd.exe" /c "C:\Python26\python.exe myscript.py" </p>
    
    <p>Action ended 15:18:51: backup_Registry_Cmd. Return value 3.</p>
  </blockquote>
  
  <p>what is the problem in this?</p>