SetFileAttributes ()

From ISXKB

Revision as of 00:10, 25 December 2007 by Markus (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

This article shows how to use the Windows API function SetFileAttributes () with Inno Setup.

Declaration

The following declaration is required in a [Code] section:

const
   FILE_ATTRIBUTE_NORMAL               = 0;
   FILE_ATTRIBUTE_ARCHIVE              = $20;
   FILE_ATTRIBUTE_HIDDEN               = 2;
   FILE_ATTRIBUTE_NOT_CONTENT_INDEXED  = $2000;
   FILE_ATTRIBUTE_OFFLINE              = $1000;
   FILE_ATTRIBUTE_READONLY             = 1;
   FILE_ATTRIBUTE_SYSTEM               = 4;
   FILE_ATTRIBUTE_TEMPORARY            = $100;

function SetFileAttributes (lpFileName : String, dwAttribs : LongInt) : Boolean;
 external 'SetFileAttributesA@kernel32.dll stdcall';

SetFileAttributes () at MSDN

Personal tools
Ads: