if (Wow64DisableWow64FsRedirection(p)) then
begin
if not CopyFileEx('C:\Users\xxx\Desktop\A.txt',
'C:\Windows\system32\drivers\AAAA.txt', nil, nil,nil, 0) then
begin
ShowMessage(IntToStr(GetLastError));
end;
Wow64RevertWow64FsRedirection(p);
end;
僅僅舉例。解決無法操作 C:\Windows\system32\drivers\ 下文件的問題。