sashoalm
sashoalm

Reputation: 79685

Set ArchitecturesInstallIn64BitMode conditionally

I use ArchitecturesInstallIn64BitMode=x64 and it works fine on 64-bit Vista/Win7, but on XP x64 it causes problems (regserver fails), so I want to set it only if the OS is not XP x64.

Is that possible?

Upvotes: 1

Views: 921

Answers (1)

TLama
TLama

Reputation: 76733

There's no way to conditionally set the ArchitecturesInstallIn64BitMode directive nor decide if you want to run the setup in 32-bit or 64-bit install mode from script in any way (even ArchitecturesAllowed cannot be conditionally set). What I'd suggest as a workaround for your problem is to use the RegisterServer function from code passing to its first parameter condition returning True when you'll be on 64-bit Vista above system. Using the code from the reference, it may looks like this (the following pseudocode should register the OCX extension as 64-bit only on 64-bit systems with Windows Vista above):

RegisterServer(IsWin64 and (GetWindowsVersion >= $06000000), 
  ExpandConstant('{sys}\hhctrl.ocx'), False);

Upvotes: 2

Related Questions