0

Based on these posts,

Writing binary file in Inno Setup

Inno Setup: Reading a file from installer during uninstallation

What is the full code to embed the Bitmap image data into Inno Setup during compile and retrieve it during the installation?

This is required during uninstall process. Because this code does not work at uninstall:

ExtractTemporaryFile('myimage.bmp');

The file cannot be copied during the installation. It should be only retrieved during uninstallation.

Codename K
  • 890
  • 4
  • 23
  • 52
  • 1
    *"the full code to embed the Bitmap image data into Inno Setup during compile and retrieve it during the installation"* is in my answer to [Inno Setup: Reading a file from installer during uninstallation](https://stackoverflow.com/q/37552286/850848) – If you have some problem, we need [mcve]. – Martin Prikryl May 27 '22 at 06:29
  • What variable decides the hex code created? – Codename K May 30 '22 at 17:17
  • 1
    I do not understand what you ask for. – Martin Prikryl May 30 '22 at 18:58
  • This one `LoadBitmapFromBinaryString( BitmapImage.Bitmap, '4D5A50000200000004000F00FFFF0000B800000....');` – Codename K May 30 '22 at 21:01
  • 1
    That's not a question. What about it? What variable? You do not put that hex code into your code manually. The hex code is generated. In your code you will use something like `LoadBitmapFromBinaryString(BitmapImage.Bitmap, {#FileToBinaryString("C:\path\WizModernSmallImage.bmp")});`. As my answer says. – Martin Prikryl May 31 '22 at 04:48
  • Yes, but what variable saves the hex code that is generated? I mean, how to find the hex code generated? – Codename K May 31 '22 at 07:08
  • 1
    You do not! The `FileToBinaryString` does that for you! Your code will be `LoadBitmapFromBinaryString(BitmapImage.Bitmap, {#FileToBinaryString("C:\path\WizModernSmallImage.bmp")});`, **NOT** `LoadBitmapFromBinaryString(BitmapImage.Bitmap, '4D5A50000200000004000F00FFFF0000B800000....');` – Martin Prikryl May 31 '22 at 18:26

0 Answers0