title: How can i run shellexecute with a variable?
body: <p>I try to execute a command in shell via delphi but it won't work.
  I use this script:</p>
  
  <pre><code>var
  shellexecommand:string;
  begin
  ShellExecute(0, nil, 'cmd.exe', '/C ' + shellexecommand + ' &gt; output.txt', nil, SW_HIDE);
  end;
  </code></pre>
  
  <p>But i get the error:</p>
  
  <blockquote>
    <p>[dcc32 Error] Unit1.pas(329): E2010 Incompatible types: 'PWideChar'
    and 'AnsiString'</p>
  </blockquote>
  
  <p>Also if i change string to pwidechar is doesn't work.
  How can i fix this?</p>