The only way is to use special tools. I don't like packers, but there is SDK for that which can be used from .net code: it's boxedapp sdk. It's very handy to just create pseudofile and then use it.