mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 16:59:11 +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;
|
unit winutils;
|
||||||
|
|
||||||
Interface
|
Interface
|
||||||
@ -24,6 +24,9 @@ Uses Windows;
|
|||||||
// From Delphi.about.com with permission, http://delphi.about.com/od/delphitips2007/qt/is_win_admin.htm
|
// From Delphi.about.com with permission, http://delphi.about.com/od/delphitips2007/qt/is_win_admin.htm
|
||||||
function IsWindowsAdmin: Boolean;
|
function IsWindowsAdmin: Boolean;
|
||||||
|
|
||||||
|
// Removes Browsers "downloaded" attribute from a file.
|
||||||
|
procedure UnBlockFile(const name:String);
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
const
|
const
|
||||||
@ -79,4 +82,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
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.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user