View Single Post
  #310  
Old 03-04-2013, 14:34
nicola16's Avatar
nicola16 nicola16 is offline
Registered User
 
Join Date: Nov 2008
Location: Italia
Posts: 74
Thanks: 23
Thanked 15 Times in 12 Posts
nicola16 is on a distinguished road
Personal folder ico

It is possible to integrate this code into setup yenner90,
to customize folder icons?



[Files]
Source: Include\Desktop.ico; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system


procedure CurStepChanged(CurStep: TSetupStep);
var
ErrorCode: Integer;
begin
if CurStep = ssPostInstall then
begin
SetIniString('.ShellClassInfo', 'IconResource',
ExpandConstant('{app}\MyProg.exe') + #13#10 'IconIndex=0', ExpandConstant('{app}\desktop.ini'));
Exec('attrib', ' +r ' + '"' + ExpandConstant('{app}') + '"', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode);
Exec('attrib', ' +h +s ' + '"' + ExpandConstant('{app}\desktop.ini') + '"', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode);
end;
end;

procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
if CurUninstallStep = usUninstall then
DeleteFile(ExpandConstant('{app}\desktop.ini'));
end;

Last edited by nicola16; 03-04-2013 at 14:40.
Reply With Quote