I want to secure some applications for some people without teaching them how to add an encryption or authentication, so I thought about mocking up a simple application that launches another application if some password or authentication function returns true. How would I wrap the application so that only the launcher would be able to access the file?
If the wrapped (protected) application is managed, you can embed it as an encrypted byte array, then call Assembly.Load(rawBytes)
and use reflection to start the application.
(The application should agree to expose some static method or attribute that launches itself, which you can call using reflection)
Note that you'll still be vulnerable to Reflector, unless you get the decryption key from a web service. (In which case you'll be vulnerable to a combination of Reflector, Fiddler, and a valid password)
You could do a variant of what SLaks suggested that would work for any EXE (.Net or native), and include the EXE as an embedded resource within your application. In your application they could click a button, and your code would then extract the EXE from itself, save it out to a temporary location, and start it with the Process
class. Your app would then wait for the Process to finish and delete the temporary file.
This would be as secure as anything else you might do (without a massive amount of effort). A savvy user could locate the EXE file while it's running and make a copy of it, but a savvy user could just extract it from your program easily anyway.