-
EXE in a resource file
I'm making a simple installer program for a little program a group of us made, I placed the EXE in a resource file, put it in the installer project, but when extracting it to an EXE file there are 12 extra bytes added to the front of the program, causing it to not work.
this is the code I'm using to try and write it from the res file to an EXE.
kioskexe = LoadResData("KIOSK.EXE", "CUSTOM")
KioskICO = LoadResData("KIOSK.ICO", "CUSTOM")
'Extracts Kiosk.exe from Kiosk Install.exe
Open frm_install4.InstallDir & "\kiosk.exe" For Binary As #1
Put #1, , kioskexe
Close #1
Anyone got an idea why it isn't working
-
Um why not just remove the first 12 bytes then ? :rolleyes:
-
I did that but now I notice other files I have in the resource file also have this problem,, but the number of bytes in front of what should be seems dependent on how large the file is.
The data in the resource file is fine, I checked it in debug mode and it is how it should be after taking it out of the resource file, but on write it's adding these stupid extra bytes.
I would have to open the file, input it all, clear out the excess and output it again, creating the same problem.
God only knows why it's adding this excess stuff.