PDA

View Full Version : 64bit enable problem



NewsArchive
04-09-2010, 02:45 AM
Hi all,

I'm trying to get an install file in hybrid mode to detect 64bit mode
and if true, set the installer to 64bit mode using the following code;

Set Variable %_IS_64BIT% to FUNCTION:Get System Info(WOW64 Status)
If %_IS_64BIT% Equals "1" Then
Display Message Box "This is a 64bit machine" -- "64Bit"
Enable x64 Support
Display Message Box "Current 64bit status is %_SB_ERRORCODE%" --
"64bit Mode Status"
Else
Display Message Box " this is NOT 64bit" -- "NOT 64bit"
End


The %_IS_64BIT% gets set to 1 but the %_SB_ERRORCODE% will always have a
zero. Any ideas on what I'm missing.

BTW I've read through all the forum posts with 64bit and also the
manual. It seems to be a pretty straight forward function, but this old
dog can't get it figured out.

Thanks for any insight.

Cheers!
ken

NewsArchive
04-09-2010, 02:45 AM
Ken,

> The %_IS_64BIT% gets set to 1 but the %_SB_ERRORCODE% will always have a
> zero. Any ideas on what I'm missing.

A 32-/64-bit Hybrid-Mode installer runs in 64-bit mode if you run it on a
64-bit system and in 32-bit mode on a 32-bit system.

It returns "0" because it is already running in 64-bit mode!

Does this help?

Friedrich

NewsArchive
04-09-2010, 02:45 AM
BTW, why are you doing this at all? Do you have to install native 32-bit
application files when running on a 32-bit operating system and native
64-bit files (or have to access 64-bit areas) when running on 64-bit Windows
from the same setup.exe?

If your application is 32-bit, then you only create a 32-bit installer,
never a 32/64-bit Hybrid nor a 64-bit installer!

In other words, the Hybrid or 64-bit features come into play when you have
to handle specific 64-bit stuff on Windows x64.

Friedrich

NewsArchive
04-09-2010, 02:45 AM
correct. My app is 32bit and has supporting files (dll activex) that
need to get put into the syswow64 directory and not the system32 directory.

Let me do some more testing... I don't think I had the hybrid mode
turned on in my main installer package which may be what is causing the
problem.

Thanks,
Ken

NewsArchive
04-09-2010, 02:46 AM
Ken,

> correct. My app is 32bit and has supporting files (dll activex) that need
> to get put into the syswow64 directory and not the system32 directory.
>
> Let me do some more testing... I don't think I had the hybrid mode turned
> on in my main installer package which may be what is causing the problem.

That means you can NOT create a 32/64 bit Hybrid installer! Please compile
a 32-bit install.

When you create a 32-bit installer for your 32-bit application then your
files go into SysWOW64 (32-bit System folder) and NOT into System32 (the
64-bit System folder). You'll also install into the "Program Files (x86)"
folder for 32-bit applications and NOT into "Program Files" (64-bit folder).
And all your registry operations including file registrations are also done
for 32-bit, and not for 64-bit.

You only need the Hybrid or 64-bit options if your application is 64-bit or
has to do 64-bit operations.

Friedrich

NewsArchive
04-09-2010, 02:46 AM
Very interesting. On a 64bit machine, absolutely nothing gets put into
syswow64 or the Program Files (x86) directory. Everything is getting
installed in the c:\program files\PropertyBoss and c:\windows\system32.

We started using SetupBuilder at an early version of 6xx so the script
has been upgraded to SB7 and we are currently at 7.1.2860.

From your last post it doesn't appear as though I need to do anything
in order to make sure that 32bit files get put into syswow64, but it
just isn't happening. Can you think of anything I could have set in the
script that would cause this symptom?

Thanks,
Ken

NewsArchive
04-09-2010, 02:46 AM
Ken,

> Very interesting. On a 64bit machine, absolutely nothing gets put into
> syswow64 or the Program Files (x86) directory. Everything is getting
> installed in the c:\program files\PropertyBoss and c:\windows\system32.
>
> We started using SetupBuilder at an early version of 6xx so the script
> has been upgraded to SB7 and we are currently at 7.1.2860.
>
> From your last post it doesn't appear as though I need to do anything in
> order to make sure that 32bit files get put into syswow64, but it just
> isn't happening. Can you think of anything I could have set in the script
> that would cause this symptom?

It only goes into the 64-bit areas if the installer is running in 64-bit
mode.

If you are interested, you can send your project file to support [at]
lindersoft [dot] com and we'll review your script for you. BTW, please also
attach your PropertyBoss uninstall .log.

Friedrich

NewsArchive
04-09-2010, 02:47 AM
I already had the hybrid mode turn on, so I believe I am
misunderstanding something.

I need to make sure that on a 64bit os I place some dlls that would
normally go to windows/system32 into the syswow64 directory. My files
are current in the system32 (blue) folder of SB. Just by the installer
being in 64bit mode, shouldn't this get place into the syswow64 folder?

Thanks,
Ken

NewsArchive
04-09-2010, 02:47 AM
Ken,

> I already had the hybrid mode turn on, so I believe I am misunderstanding
> something.
>
> I need to make sure that on a 64bit os I place some dlls that would
> normally go to windows/system32 into the syswow64 directory. My files are
> current in the system32 (blue) folder of SB. Just by the installer being
> in 64bit mode, shouldn't this get place into the syswow64 folder?

SetupBuilder does all the dirty work for you ;-) Add your files to the
(blue) System32 folder and you are done. Never ever play or hard-code WOW64
items (not in SetupBuilder, not in Clarion or any other language).

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

NewsArchive
04-09-2010, 02:48 AM
Ken,

You do NOT want hybrid mode turned on.
Your app is 32-bit. The installer should be set for 32-bit (see pic)

Compile and try the attached example on a 64-bit machine. It will install
into syswow64 and program files (x86).

Jane

NewsArchive
04-09-2010, 02:49 AM
Ken,

You still switch into 64-bit mode on x64 systems (see attached screenshot).

Your application is 32-bit so it's not correct to switch your installer into
64-bit mode :)

Does this help?

Friedrich

NewsArchive
04-09-2010, 02:50 AM
The "Enable x64 Support" function enables support for 64-bit functionality,
but your 32-bit application does not need any 64-bit support!

Friedrich

NewsArchive
04-09-2010, 11:04 AM
Freidrich... I can't thank you enough. We've added comments to our
script to not use the 64bit stuff to prevent this in the future.

In all seriousness, you guys rock!

Thanks,
Ken

NewsArchive
04-09-2010, 11:05 AM
Ken,

If it helps, keep in mind these attributes are for the installer, not where its
installed. Sometimes a small shift in viewpoint makes these things clear.

--
Russell B. Eggen
www.radfusion.com
Clarion developers: www.radfusion.com/devs.htm