+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: run 64-bit program from a 32-bit mode program

  1. #1
    Unregistered Guest

    Default run 64-bit program from a 32-bit mode program

    We would like to install our software on 64-bit machines but have been having some problems getting them to run on the different OS's. Some of the things we need to do, such as installing IIS if it is not already there, fails on 64-bit machines. Our thought was that it is running the installer in 32-bit mode and then calls pkgmgr to install IIS, and pkgmgr is then also running in 32-bit mode, which then causes it to fail. We get a "An attempt was made to load a program with an incorrect format" error from the package manager. Has any one run into issues like this with 64-bit machines? We would like to keep the installer in 32-bit mode so that our program gets installed to the Program Files (x86) directory and so that it uses the 32-bit registry hive, but we would also like to install IIS so that our customers do not have to. Any suggestions?

    Thank you
    Jonathon

  2. #2
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: run 64-bit program from a 32-bit mode program

    Jonathon,

    You would only compile a 64-bit mode installer if your software is native 64-bit. But as I understand it, your software is 32-bit, so using a 32-bit mode installer is correct here. What function do you use to launch the pkgmgr Package Manager (on Vista and/or Windows 7)?

    Friedrich

  3. #3
    Unregistered Guest

    Default Re: run 64-bit program from a 32-bit mode program

    Quote Originally Posted by linder View Post
    Jonathon,

    You would only compile a 64-bit mode installer if your software is native 64-bit. But as I understand it, your software is 32-bit, so using a 32-bit mode installer is correct here. What function do you use to launch the pkgmgr Package Manager (on Vista and/or Windows 7)?

    Friedrich
    Yes our software is 32-bit. We have so far only tested this on Windwos 7 64-bit, though 32-bit installations work fine.

    We can not use the Run Program command in SetupBuilder to call pkgmgr directly because it can not hold all of the components that we want to install with IIS (character limit reached it seems like). We are currently using Run Program to call a .bat file which just contains one line: "pkgmgr /iu:<package list>".

  4. #4

    Default Re: run 64-bit program from a 32-bit mode program

    Our software is 32-bit. We have only tested the 64-bit install on Windows 7, though it works fine on 32-bit OSs. We do need this to work on Server 2003 as well, but I figured the solution would be similar on both OSs.

    We tried using Run Program command in SetupBuilder to run pkgmg but there was not enough room for all of the components we wanted to install (seemed like a character limit was reached). We are currently using Run Program to run a .bat file that just has one line in it: "pkgmgr /iu:<list of components>".

  5. #5
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: run 64-bit program from a 32-bit mode program

    Hello,

    Quote Originally Posted by Unregistered View Post
    Yes our software is 32-bit. We have so far only tested this on Windwos 7 64-bit, though 32-bit installations work fine.

    We can not use the Run Program command in SetupBuilder to call pkgmgr directly because it can not hold all of the components that we want to install with IIS (character limit reached it seems like). We are currently using Run Program to call a .bat file which just contains one line: "pkgmgr /iu:<package list>".
    Try to create a custom runtime variable (e.g. %MY_COMMAND_LINE%) and then use this in the Run Program "Command Line" field.

    Does this help?

    Friedrich

  6. #6

    Default Re: run 64-bit program from a 32-bit mode program

    I tried packing all of the components into a variable but I still get the same error message. When I open up task manager, it looks like pkgmgr is still running in 32-bit mode. I set the target folder to %SYS32DIR%, shouldn't that take a 64-bit version of pkgmgr and run that?

    Thanks for any help

  7. #7

    Default Re: run 64-bit program from a 32-bit mode program

    I forgot to mention, we are running SetupBuilder 6.9. Does 7.1 handle this any differently?

  8. #8
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: run 64-bit program from a 32-bit mode program

    Hello,

    No, %SYS32DIR% points to the SysWOW64 folder on 64-bit Windows operating systems.

    WOW64, short for "Windows-32-on-Windows-64," is responsible for providing two levels of support for 32-bit legacy applications. WOW64 prevents file and registry collisions between 32-bit and 64-bit versions of applications by redirecting the 32-bit registry and file system accesses.

    The system files in Windows x64 Edition are not present on just the Windows\System32 folder, but split into two folders to separate the 32-bit applications from the 64-bit applications. The WOW64 subsystem intercepts calls from a 32-bit legacy application and redirects it to the Windows\SysWow64 folder. If the call is from a 64-bit application, then the call is routed to the Windows\System32 folder and does not involve the WOW64. Microsoft has retained the name System32 for the folder, which hosts the 64-bit system files. The "Program Files" folder on a x64 system which stores 32-bit legacy applications is named Program Files (x86). 64-bit applications are stored in the Program Files folder.

    Friedrich

  9. #9
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: run 64-bit program from a 32-bit mode program

    I don't think this has anything to do with SetupBuilder at all!!!!!

    In most cases, the "An attempt was made to load a program with an incorrect format" error occurs when a program has been compiled as a specific "bitness", e.g. you try to use x86 versions on a x64 machine.

    Friedrich

  10. #10
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: run 64-bit program from a 32-bit mode program

    BTW, I am not sure what exactly you are doing. But the following is worth a try.

    You can use "Set x64 Mode..." script function to (temporarily) switch the installer into 64-bit mode. For example, if you do this before your "Run Program" call, then %SYS32DIR% will not point to the 32-bit System32 folder but to the "real" System32 folder for 64-bit applications. After that, switch back to 32-bit mode.

    Hope this helps.

    Friedrich

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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