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

ios - iPhone/iPad different view orientations in different views , and apple approval process -

monitor web browser programmatically in Android? -

c# - Using multiple datasets in RDLC -