Home > Archive > Programming with dBASE > November 2005 > Get File from inside EXE









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Get File from inside EXE
Joe Merces

2005-11-03, 8:24 pm

I have a file that I've included within the executable.
I don't want it available in the program folder.
Does anyone know how to get dBASE 2.6 to use the file contained in the EXE
using open() and read() rather than having to copy the file out to disk?

f.open(this.filename,"R")
r1=f.read(100)


David Stone

2005-11-03, 8:24 pm

Joe Merces wrote:

> I have a file that I've included within the executable.
> I don't want it available in the program folder.
> Does anyone know how to get dBASE 2.6 to use the file contained in the EXE
> using open() and read() rather than having to copy the file out to disk?
>
> f.open(this.filename,"R")
> r1=f.read(100)


Hi Joe, as far as I know, the simplest option would be to copy it out to disk,
then use low-level (or other) functions to get the data into a variable, then
erase the disk file. It would only be on the disk for a second or so unless
the app crashes during the operation.

Well, actually, if you know where it starts/ends in the executable, I guess
you could use low-level commands to grab it directly from there.

David


Ken Mayer [dBVIPS]

2005-11-03, 8:24 pm

David Stone wrote:
> Joe Merces wrote:
>
>
>
>
> Hi Joe, as far as I know, the simplest option would be to copy it out to disk,
> then use low-level (or other) functions to get the data into a variable, then
> erase the disk file. It would only be on the disk for a second or so unless
> the app crashes during the operation.
>
> Well, actually, if you know where it starts/ends in the executable, I guess
> you could use low-level commands to grab it directly from there.


The copy command allows you to copy a file out of the .exe ... check it
out (OLH).

Ken

--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/dbase/dBASEBook.htm
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
David Stone

2005-11-03, 8:24 pm

"Ken Mayer [dBVIPS]" wrote:

> The copy command allows you to copy a file out of the .exe ... check it
> out (OLH).


I think Joe was trying to avoid doing that because he's worried about user access to
the file.

David

Joe Merces

2005-11-03, 8:24 pm

David,
You're correct that I wanted to avoid user access to the file and was hoping
someone knew of an option here, but I'll make due. Thanks David and Ken for
the help as always!

Best Regards,
Joe

"David Stone" <dlstone@wholegrain.com> wrote in message
news:436AB60B.70CC1E01@wholegrain.com...
> "Ken Mayer [dBVIPS]" wrote:
>
>
> I think Joe was trying to avoid doing that because he's worried about user
> access to
> the file.
>
> David
>



Ken Mayer [dBVIPS]

2005-11-04, 9:23 am

David Stone wrote:
> "Ken Mayer [dBVIPS]" wrote:
>
>
>
>
> I think Joe was trying to avoid doing that because he's worried about user access to
> the file.


Unfortunately there really aren't a lot of other options. Copy the file
out of the .exe, do what you need to, erase the file. I would bet that
most users won't have a clue. And if you need to obscure things, use one
of the weirder paths on the machine such as the documents folders that
are installed with the operating system. Create a random folder name ...
there are lots of things that could be done to make it very hard indeed
on the end-user to find the file. But in the long run, most users, I
have found, don't care ...

Ken

--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/dbase/dBASEBook.htm
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
David Stone

2005-11-04, 8:23 pm

"Ken Mayer [dBVIPS]" wrote:

> But in the long run, most users, I have found, don't care ...


Eggzactly... ;-)

David


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com