相关文章推荐
Result := true ; fileName := ExpandConstant( ' {pf}\{#MyAppName}\batch.bat' ); SetArrayLength(lines, 3); lines[ 0 ] := ' echo hello' ; lines[ 1 ] := ' pause' ; lines[ 2 ] := ' exit' ; Result := SaveStringsToFile(filename,lines,true); exit ; end ; procedure CurStepChanged(CurStep: TSetupStep); begin if CurStep=ssPostInstall then begin CreateBatch(); end ;
Valery. begin
// create the directory and file name
fileName := ExpandConstant('{pf}\{#MyAppPublisher}\{#MyAppName}\c3deditor');
// log the operation
Log('Creating ' + fileName + '.bat');
// write a one line batch file to run the app
SaveStringToFile(fileName + '.bat',#34 + fileName + '.exe" -b %1' + #13#10, False);
  • Read the question carefully.
  • Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  • If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  • Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question. Let's work to help developers, not make them feel stupid.
  •  
    推荐文章