I am reading and writing to a file created by the eBook and all is well under XP. However, if the setup program is run under Windows 7 (administrator of course, to be able to run setup) I can’t access the file to write to (although reading is fine), when logged on as another user.
Does anyone know the Delphi/HRML Executable call to set the file permissions to read/write for anyone. I could do this at setup time if necessary.
It can work on Windows 7 if you do not write the file in restricted areas like C:\Program Files…
HTML Executable provides you with a storage folder where you are sure that you can always write and read data for your publication.
The location to the storage folder is available in the HEPubStorageLocation variable.
See the doc at: http://www.htmlexe.com/help/samplescript3 and http://www.htmlexe.com/help/globalvariables
Your solution works fine but this was part of a larger problem.
The data in the file mentioned above is used by the eBook and is read and written by the user at any time.
This problem only applies to users running the eBook who are not administrators. Any answer to this or any other solution gratefully accepted.
Sorry to confuse you, your quote is only for portable publications. AFAIK, you are not making a portable publication, so the storage folder is on the end user’s hard drive, at a writeable place.
I used this link because in case you are making a portable publication, data is written in the same folder as the EXE file (that’s normal: a portable publication shouldn’t write data on the end user’s computer, but on the device where it is stored, like a USB stick).
But in your case, you don’t make a portable pub, so it won’t happen: the publication will store its data into the storage folder. HTMLExe gives you an option to change the name of this storage folder.
So the question is, is there a folder somewhere where I can write to files that is accessible to both administrator and non-administrator users? Alternatively, is it possible to change permissions on a file to make it writeable for example, in the programme folder?
Yes but when I load a new version of eBook the location will change. I need a known location (that is writeable) I can copy the notes file to from version 12 that can then be read in by version 13 to maintain continuity.
Currently they in locations like this which I don’t know how to find: