Hello everybody

Could you try this code in
Windows 7 ?
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls;
type
{ TForm1 }
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
if DirectoryExists(pchar('C:\Program Files\test')) then else
ForceDirectories(pchar('C:\Program Files\test'));
if DirectoryExists(pchar('C:\Program Files\test')) then
MessageDlg('\test\ exists...' ,mtInformation, [mbYes], 0)
else MessageDlg('\test\ do not exist...' ,mtWarning, [mbYes], 0) ;
if DirectoryExists(pchar('C:\Program Files\test')) then
removedir(pchar('C:\Program Files\test')) ;
end;
end;
end.In Windows 7First try to compile without Manifest enabled.
You should get message
\test\ exists...
Now compile it with Manifest : the directory is not created and you get
\test\ do NOT exist !
The new policy of Microsoft redirects all files created in
C:\Program Files to
C:\Users\your_user_name\AppData\Local\VirtualStore\Program Files\It seems that Manifest do not care about that...
