Command 程序示例,可以带参数运行

类别:Delphi 点击:0 评论:0 推荐:

program softInfo;

uses
? Forms,
? Windows,? Dialogs,? shellapi,? inifiles,? SysUtils ;

{$R *.res}
? procedure install();
? begin
??? MessageDlg('install',mtWarning,[mbOK],0) ;
? end;

? procedure uninstall();
? var iniValue,iniFile,xmlFile:string; productID:integer;
? begin
??? MessageDlg('uninstall',mtWarning,[mbOK],0) ;
? end;

var
? paramName:string;
begin
? Application.Initialize;

? if ParamCount > 0 then paramName:=LowerCase(ParamStr(1));
? if (paramName='install') or (paramName='-install')? or (paramName='') then install();
? if (paramName='uninstall') or (paramName='-uninstall') then uninstall();
?
? Application.Run;
end.

本文地址:http://com.8s8s.com/it/it4943.htm