Results 1 to 3 of 3

Thread: EXE in a resource file

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2002
    Posts
    9

    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

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Um why not just remove the first 12 bytes then ?
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2002
    Posts
    9
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width