cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ChristianS
Level 4

How can I determine the type of CPU on the target computer?

Hello,

Up until now our techs just copied applications and files to the target drive and registered codecs and edited config-files manually.
Now we want to automize this process by using InstallShield 2011.
We have different codecs for single-core and dual-core CPUs. Is there a way to find out which CPU the target computer has and install the approriate codec?


Thank you for your help!
Christian S
Labels (1)
0 Kudos
(3) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

I don't believe the standard Hardware Properties cover this, so if you know how to detect this, it would be good to write a custom action that will detect it and set a property. Then your components can reference this property in their conditions.

That said, this approach may cause your application or library to break (or under-perform) if the CPU is changed, or the hard drive migrates across machines. Assuming that's not a feature, consider installing both codecs and performing the check at run-time instead of install-time.
0 Kudos
dasmyth
Level 3

The information is found in the registry; HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor
with a sub key for each core / cpu eg my dual core system has subkeys 0 and 1

You could do a check on through System Search with criteria for if single core... HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0 ....will exist.
If dual core ....
HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0 and
HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\1 ... will exist.

And so on for quad core, dual cpu etc
0 Kudos
ChristianS
Level 4

Thank you both 🙂

I believe I will try it your way, dasmyth, it seems to be the quicker, easier way.
0 Kudos