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