Launch/Unpack App from Package?

  • Thread starter Thread starter Snaux
  • Start date Start date
S

Snaux

I was playing around yesterday and noticed that it's possible to store
..exe files in fields as packages. To my surprise I found that by
double-clicking them, they would run. Since my current project uses a
number of shell-executed apps (and since my target audience has an
annoying tendency to play with things they shouldn't) this got me
thinking:

1) Since small packaged exe's will run if I double-click them, how do I
run them via VBA code?

2) Is there a way to unpackage them back into standalone exe files?
 
I answered this the other day for you.

It might be simpler for you to just store a copy of the Exe in a Long Binary
field. At runtime, copy the contents of the field to a temp file and then
Shell to this file. I'm sure there will be security issues that must be
considered.

If you prefer to stay with OLE, your Exe is inserted as an object of type
Package. Your Exe file is wrapped in a small header, the details of which
are explained in the tool I will point you to on my site. You can easily
extract the embedded Exe file.
http://www.lebans.com/oletodisk.htm

I have not tested on Packaged Exe files, but you should be able to createa
hidden form with an OLE Frame control bound to the field in question, and
call the control's Activate method to launch the embedded Exe.



--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Thanks for the help... twice.

I posted the first time via Google Groups, during their maintennance
period. Groups has no record of my original post, and no record of your
response... serves me right for not using Usenet normally!
 
Back
Top