#define MyAppVersion "0.0.1-beta.3"
[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application
OutputDir=.
[Code]
#define A = (Defined UNICODE) ? "W" : "A"
function SetFileAttributes( lpFileName: String; dwFileAttributes: DWORD ): BOOL; external 'SetFileAttributes{#A}@kernel32.dll stdcall';
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssDone then
begin
//DeleteFile(ExpandConstant('{src}\version'));
SaveStringToFile(ExpandConstant('{src}\version'), '{#MyAppVersion}', false);
// SetFileAttributes( ExpandConstant('{src}\version'), FILE_ATTRIBUTE_SYSTEM );
end;
end;