Read From locked files under WinNT
Richard Gaskin
ambassador at fourthworld.com
Mon Mar 10 11:12:01 EST 2003
R. Hillen wrote:
> Hello,
>
> I wrote a minimal program to read textfiles: "answer file, open file,
> read from file, put it into fld xxx, close file" and made a standalone
> for Windows using RunRev 1.1.1 on MacOSX.
>
> On two WindowsComputer (WinNT, Win2000) I had a simple TextFile to test
> it and it all was ok: the data were read!
>
> Next I tried to read a text file, which was locked, as it came from a
> measurement-system by floppy (write protected, as I learned from the
> file-properties) and got the message, that the file couldnt be read.
> I unlocked the file and the file could be read again.
>
> But why?
>
> On both machines we use a Sandbox-Program, "Surfin Shield", which said
> in Admin-Mode" The program tries to write to the registry. This is not
> allowed!"
>
> So I wonder, why such a simple programm wants to write to the registry?
>
> Any Ideas?
What is the code you're using to read the file?
Specifically, are you opening the file for read only, or are you also
attempting to get write permission?
To open a file for read only, use:
open file tMyFilePath for read
Or more simply, you can open, read, and close the file in one line by
referring to it as a local URL:
put url ("file:"*tMyFilePath) into tMyVar
--
Richard Gaskin
Fourth World Media Corporation
Developer of WebMerge 2.2: Publish any database on any site
___________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
Tel: 323-225-3717 AIM: FourthWorldInc
More information about the use-livecode
mailing list