Jump to content

Packing a PDF inside an Exe


Recommended Posts

Ok im writing some tutorials on word and excel type stuff which im making into PDF's

Now to stop rampant copying of the files im including a little protection Find the hidden if present type scenario, so when they run it if the file isnt present then it will close.

Nothing groundbreaking just simple stuff.

Heres the question

If i embed a pdf using FileInstall so its added to the compiled exe

Do i just call the pdf using ShellExecute ?

Or do i have to empty the file somewhere and call from there?

Or is there a better way?

Many thanks

Link to comment
Share on other sites

FileInstall() function is made to move the file to a specified location. Then, like you said, just call it with ShellExecute() from the location that FileInstall() spit the file out at.

EDIT: I would just dump it in @TempDir and call it. If the user wants to save a copy themselves they can do it. Have it ShellExecuteWait() instead, then when their PDF reader closes, have it cleanup the file out of @TempDir.

Edited by mechaflash213
Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...