[Files]
Source: "F:\软件发布\dzj\nocompress\*"; DestDir: "{app}\data"; Flags: ignoreversion nocompression
Source: "F:\软件发布\dzj\13-1-31\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs nocompression
Source: "F:\软件发布\dzj\other\dotnetfx20.exe"; DestDir: "{tmp}"; Flags: ignoreversion dontcopy
[code]
function CheckDotNet2_0():boolean;
begin
Result:= RegKeyExists(HKLM, 'SOFTWARE\Microsoft\.NETFramework\policy\v2.0');
end;
function CopyFile(): Boolean;
var ResultCode: Integer;
Psrc :string;
begin
Psrc:= '/c xcopy '+ExpandConstant('{src}')+'\nocompress\*.* ' +ExpandConstant('{app}')+'\data\';
Exec(ExpandConstant('{cmd}'), Psrc,'', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);
Result:=true;
end;
function InitializeSetup(): Boolean;
var Path:string;
ResultCode: Integer;
begin
if (CheckDotNet2_0() = false) then
begin
ExtractTemporaryFile('F:\软件发布\dzj\other\dotnetfx20.exe');
Exec(ExpandConstant('{tmp}/dotnetfx20.exe'), '', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);
end;
Result:=true;
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep=ssinstall then
begin
CopyFile();
end;
end;
[Run]
;Filename: "{cmd}"; Parameters: "/c xcopy {src}\nocompress\*.* {app}\data"; Flags: hidewizard
[Registry]
Root: HKLM; Subkey: "Software\ShanLian"; Flags: uninsdeletekeyifempty
Root: HKLM; Subkey: "Software\ShanLian\sutraSoft"; Flags: uninsdeletekey
Root: HKLM; Subkey: "Software\ShanLian\sutraSoft"; ValueType: string; ValueName: "PATH"; ValueData: "{app}"
Root: HKLM; Subkey: "Software\ShanLian\sutraSoft"; ValueType: string; ValueName: "Version"; ValueData: #MyAppVersion