|
@@ -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.
|