文件名称:inno 程序安装时显示目标磁盘的剩余空间.doc
文件大小:732KB
文件格式:DOC
更新时间:2015-12-27 16:43:14
inno 磁盘剩余空间
INNO脚本代码: [Setup] AppName=My Program AppVerName=My Program version 1.5 DefaultDirName={pf}\My Program DefaultGroupName=My Program [Files] Source: "MyProg.exe"; DestDir: "{app}" Source: "Readme.txt"; DestDir: "{app}" [Code] var freespacelabel: TLabel; FreeSpace, TotalSpace: Cardinal; procedure ShowFreeSpaceOnDisc(Sender: TObject); begin GetSpaceOnDisk(ExtractFileDrive(WizardForm.DirEdit.Text), True, FreeSpace, TotalSpace); freespacelabel.Caption:= '磁盘可用空间: ' + IntToStr(FreeSpace) + ' MB。'; end;