delphi - writing to a file in the system directory -


i've been trying write file in system dir on computers' can't work;what necessary permissions?i need update ss without having manually change permissions on each , every computer...

    var     z: thandle; ...     begin     ....     z:=openfile('myfile.scr',a,of_write);     filewrite(z,buf[16],3124);     fileclose(z);     end; 

most down the file system redirector. assuming running elevated have sufficient rights. 32 bit process sees 32 bit system folder syswow64. that's file landing.

if need write 64 bit system directory either run 64 bit process, or write sysnative alias.

i'm not quite sure why using legacy openfile. normal use createfile. or tfilestream.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -