mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-24 04:19:26 +02:00
* Unblockfile to programmatically unblock MSIE downloads
git-svn-id: trunk@23372 -
This commit is contained in:
parent
f08a1ed7c9
commit
72d1b249db
@ -13,7 +13,7 @@
|
||||
|
||||
**********************************************************************}
|
||||
|
||||
{$mode objfpc}
|
||||
{$mode objfpc}{$H+}
|
||||
unit winutils;
|
||||
|
||||
Interface
|
||||
@ -24,6 +24,9 @@ Uses Windows;
|
||||
// From Delphi.about.com with permission, http://delphi.about.com/od/delphitips2007/qt/is_win_admin.htm
|
||||
function IsWindowsAdmin: Boolean;
|
||||
|
||||
// Removes Browsers "downloaded" attribute from a file.
|
||||
procedure UnBlockFile(const name:String);
|
||||
|
||||
implementation
|
||||
|
||||
const
|
||||
@ -79,4 +82,13 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure UnBlockFile(const name:String);
|
||||
var f : file;
|
||||
begin
|
||||
assignfile(f,name+':Zone.Identifier');
|
||||
rewrite(f,1);
|
||||
truncate(f);
|
||||
closefile(f);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user