I've encrypted a file from my local machine, but now I'm looking to make it exe file. User just double click on it and a form will be displayed to ask for the password and decrypt the file. I don't know how to embed a form with encrypted file.

Can anybody help me out
thanks in advance

7 Years
Discussion Span
Last Post by JerryShaw

You cna add the item as a resource to your application, however displaying it, maybe more complex if the user doesnt have the facilities to decrypt or use a relevant app to display it. That would be the bigger stumbling block.


Thanks LizR's for you quick response. Basically I'm developing an application for encryption and decryption of a file. User select a file inside my application and encrypt the file to destination folder, In this step I just want to create the encrypted file as a exe file.
User just double click on it without installing my application and get the decrypted file.
How can I do this.
Please help me.


Well if its a resource its available, to use (use google) so all you would need to do is write either a console or windows form based app that asks them for password etc, and then where to save the file


Is the file your application encrypts an executable or something like a text file ?

Your application could use a Trojan technique. You would need a separate small exe that knows how to request the password, inspect the cypher key, decrypt the (named) embedded file to disk and perhaps call upon windows to open that new file.

To place the file into the trojan, you would need to access (add) the file to the resources section of the trojan exe. Then rename the trojan to the name you desire. Once the user runs this trojan exe, it would popup the password dialog. Once they enter the correct password, you would write the file from the resources section onto the hard drive. Then, if the system supports the file extension, you could launch it.

sounds very do-able. Have fun with it.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.