View Full Version : Detecting 64bit system
NewsArchive
02-26-2009, 01:46 PM
Hi Friedrich,
Help!
My install needs to copy files out of the Virtual store on vista. Problem
is that those folder structures are different on Vista32 and Vista64, i.e.
you have "Program Files" on one "Program Files(x86)" on the other as part of
the path to the files in the virtual store.
I looked at the help for "Set x64bit mode" but the help says nothing about
what it is for<bg> Only that it "lets you enable or disable support for x64
on Windows x64 systems at run-time" And that you can select Enable and
Disable to enable and disable the support. Sorry but this doesn't really
tell me anything about what it is for and how it can be used.
Any ideas how to detect 64bit?
Best regards,
--
Arnór Baldvinsson - Icetips Creative, Inc.
Port Angeles, Washington
www.icetips.com - www.buildautomator.com
Icetips product subscriptions at http://www.icetips.com/subscribe.php
NewsArchive
02-26-2009, 01:46 PM
Hi Friedrich,
> Any ideas how to detect 64bit?
This is a kludge at best but what I ended up with was InstrI on
CSIDL_PROGRAM_FILES to find if it contained '(x86)' Apparently it works<g>
Best regards,
--
Arnór Baldvinsson - Icetips Creative, Inc.
Port Angeles, Washington
www.icetips.com - www.buildautomator.com
Icetips product subscriptions at http://www.icetips.com/subscribe.php
NewsArchive
02-26-2009, 01:47 PM
Hi Arnór,
>> Any ideas how to detect 64bit?
>
> This is a kludge at best but what I ended up with was InstrI on
> CSIDL_PROGRAM_FILES to find if it contained '(x86)' Apparently it
> works<g>
Use the %PROGRAMFILESDIR% variable and the "Set x64 Mode..." function.
%PROGRAMFILESDIR% always holds the "correct" Program Files folder name.
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes
-- Official Comodo Code Signing and SSL Certificate Partner
NewsArchive
02-26-2009, 01:47 PM
Hi Friedrich,
>> This is a kludge at best but what I ended up with was InstrI on
>> CSIDL_PROGRAM_FILES to find if it contained '(x86)' Apparently it
>> works<g>
>
> Use the %PROGRAMFILESDIR% variable and the "Set x64 Mode..." function.
> %PROGRAMFILESDIR% always holds the "correct" Program Files folder name.
I needed this to detemine the path for the virtual store, not the
CSIDL_PROGRAM_FILES. It is correctly set to "Program Files (x86)" but I
needed to pull data out of the VS for previous installs of this program so I
had to construct the VS folders.
Best regards,
--
Arnór Baldvinsson - Icetips Creative, Inc.
Port Angeles, Washington
www.icetips.com - www.buildautomator.com
Icetips product subscriptions at http://www.icetips.com/subscribe.php
NewsArchive
02-26-2009, 01:48 PM
>> Use the %PROGRAMFILESDIR% variable and the "Set x64 Mode..." function.
>> %PROGRAMFILESDIR% always holds the "correct" Program Files folder name.
>
> I needed this to detemine the path for the virtual store, not the
> CSIDL_PROGRAM_FILES. It is correctly set to "Program Files (x86)" but
> I needed to pull data out of the VS for previous installs of this program
> so I had to construct the VS folders.
Aha, okay. You mentioned CSIDL_PROGRAM_FILES and so I suggested to use
%PROGRAMFILESDIR% because this variable always (and automatically) holds the
correct path for Program Folder (even if the execution mode changes).
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes
-- Official Comodo Code Signing and SSL Certificate Partner
NewsArchive
02-26-2009, 01:49 PM
Hi Arnór,
The "Set x64 Mode" function does exactly what the documentation says <bg>.
It lets you programmatically enable or disable support for x64 on Windows
x64 systems at run-time ;-)
First of all, you can use "Get System Information (WOW64 Status)" to
determine whether the SetupBuilder installation application is running under
WOW64 (64-bit Windows). It returns "1" on x64 systems.
Let us assume, you are running a 32-bit installation application under x64.
The installer runs in 32-bit mode and if you install to the Program Files
folder then your write to "Program Files (x86)". If you read/write the
registry, then you are processing the 32-bit registry part -- that is the
Wow6432Node. If you install self-registering files, you are doing this for
32-bit.
But sometimes you have to handle 32-bit and 64-bit operations from the same
installation. But how to do this from a 32-bit application?
The "Set x64 Mode" comes into play. If you enable support for "x64", you
are switching the SetupBuilder application into 64-bit mode. All actions
are done for 64-bit Windows now. You are writing to the real 64-bit
"Program Files" folder, you are processing the real 64-bit registry and you
are executing a real 64-bit self-registration process.
See attached script snippet screenshot and "32_64.sb6" demo project.
The project detects x64 status. If it is running on a x64 machine, it
displays the Program Files folder. Because the process is running in
32-bit, it displays "Program Files (x86)". Then the script switches the
application into 64-bit mode and displays the Program Files folder again.
This time it is running in 64-bit processing mode and so the real 64-bit
"Program Files" folder is displayed.
I'll add all the information above to the documentation.
BTW, you can do the same for 64-bit installation applications. A 64-bit
application executes on 64-bit systems only -- but you can switch the 64-bit
application into 32-bit processing mode to handle 32-bit specific actions.
Friedrich
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes
-- Official Comodo Code Signing and SSL Certificate Partner
NewsArchive
02-26-2009, 01:50 PM
Hi Friedrich,
> The "Set x64 Mode" function does exactly what the documentation says <bg>.
> It lets you programmatically enable or disable support for x64 on Windows
> x64 systems at run-time ;-)
Sorry but this is way too broad to be useful.
> First of all, you can use "Get System Information (WOW64 Status)" to
> determine whether the SetupBuilder installation application is running under
> WOW64 (64-bit Windows). It returns "1" on x64 systems.
The docs state that this is used to "determine whether the specified process
is running under WOW64" It does not mention (that I can find) how to
specify the process and there is no extra field to specify it when the WOW64
is selected.
> The "Set x64 Mode" comes into play. If you enable support for "x64", you
> are switching the SetupBuilder application into 64-bit mode. All actions
> are done for 64-bit Windows now. You are writing to the real 64-bit
> "Program Files" folder, you are processing the real 64-bit registry and you
> are executing a real 64-bit self-registration process.
Ok, I suggest you put THIS kind of information into the help since this is
actually useful:)
> BTW, you can do the same for 64-bit installation applications. A 64-bit
> application executes on 64-bit systems only -- but you can switch the 64-bit
> application into 32-bit processing mode to handle 32-bit specific actions.
Excellent.
In my case all I need to do is determine if the system is running under
64bit - I'm not using any of the 64bit folders etc. but need to determine
the path to the virtual store program files.
Best regards,
--
Arnór Baldvinsson - Icetips Creative, Inc.
Port Angeles, Washington
www.icetips.com - www.buildautomator.com
Icetips product subscriptions at http://www.icetips.com/subscribe.php
NewsArchive
02-26-2009, 01:51 PM
>> First of all, you can use "Get System Information (WOW64 Status)" to
>> determine whether the SetupBuilder installation application is running
>> under WOW64 (64-bit Windows). It returns "1" on x64 systems.
>
> The docs state that this is used to "determine whether the specified
> process is running under WOW64" It does not mention (that I can find)
> how to specify the process and there is no extra field to specify it
> when the WOW64 is selected.
Agreed. We'll change text to "...determine whether the SetupBuilder
application is running under WOW64..."
>> The "Set x64 Mode" comes into play. If you enable support for "x64",
>> you are switching the SetupBuilder application into 64-bit mode. All
>> actions are done for 64-bit Windows now. You are writing to the real
>> 64-bit "Program Files" folder, you are processing the real 64-bit
>> registry and you are executing a real 64-bit self-registration process.
>
> Ok, I suggest you put THIS kind of information into the help since this
> is actually useful:)
Done :)
>> BTW, you can do the same for 64-bit installation applications. A 64-bit
>> application executes on 64-bit systems only -- but you can switch the
>> 64-bit application into 32-bit processing mode to handle 32-bit specific
>> actions.
>
> Excellent.
>
> In my case all I need to do is determine if the system is running under
> 64bit - I'm not using any of the 64bit folders etc. but need to determine
> the path to the virtual store program files.
Aha, okay. Then you only need "Get System Information (WOW64 Status)"
Friedrich
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes
-- Official Comodo Code Signing and SSL Certificate Partner
NewsArchive
02-26-2009, 01:52 PM
Hi Friedrich,
>> In my case all I need to do is determine if the system is running under
>> 64bit - I'm not using any of the 64bit folders etc. but need to determine
>> the path to the virtual store program files.
>
> Aha, okay. Then you only need "Get System Information (WOW64 Status)"
I can see that now:) I will modify my install to use that for next
release:)
You have to remember that for most of us 64bit is a new thing;) This
virtual store path difference took me by complete surprise since I just
hadn't thought about it, but once I saw what it was it made complete sense.
Best regards,
--
Arnór Baldvinsson - Icetips Creative, Inc.
Port Angeles, Washington
www.icetips.com - www.buildautomator.com
Icetips product subscriptions at http://www.icetips.com/subscribe.php
NewsArchive
02-27-2009, 02:46 AM
Hi Arnór,
> You have to remember that for most of us 64bit is a new thing;) This
> virtual store path difference took me by complete surprise since I
> just hadn't thought about it, but once I saw what it was it made
> complete sense.
Yes, I know what you mean :)
We introduced support for Windows x64 in September 2005 and at that time
less than 1% of the SetupBuilder users made use of it. Of course, the
release of Vista and Windows 2008 changed this dramatically.
It took more than six months to develop 64-bit support, but I am more than
happy that we did it. Microsoft even fixed 64-bit bugs in Windows based on
error reports we provided during our SetupBuilder research and development.
We can support 32-bit, hybrid 32-/64-bit and 64-bit installations now.
Friedrich
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes
-- Official Comodo Code Signing and SSL Certificate Partner
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.