Sign in to follow this  
Followers 0
Chimaera

Packing a PDF inside an Exe

2 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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.”

 

Share this post


Link to post
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
Sign in to follow this  
Followers 0