Detect 32bit or 64bit EXCEL installation with PaquetBuilder?

Hi @gdgsupport (and All),

I need help figuring out how to determine whether a user has Microsoft Excel installed as the 32bit Excel or the 64bit Excel, so the installer will go a different route in installing things. Can anyone help?

I see there are system variables such as #IS64OS, but I’m looking for more of a way to find the Excel bitness.

Thanks for any advise!!

Dan

It’s more complicate because PB doesn’t know about Excel.
Here is a possible code we use:

<?xml version="1.0" encoding="utf-8"?>
<pbgroup><action GUID="0ICCD"><type>TReadRegInfo</type><desc>Read &quot;Path&quot; from the registry key &quot;SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\excel.exe&quot; to &quot;%PATHEXCEL%&quot;</desc><img>2</img><prop><RootKey>hkLocalMachine</RootKey><Key>SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\excel.exe</Key><Ident>Path</Ident><Variable>%PATHEXCEL%</Variable></prop><imgn>25</imgn></action><action GUID="KMQQL"><type>TModVarInfo</type><desc>Add the path back slash to the directory in &quot;%PATHEXCEL%&quot; if missing</desc><img>10</img><prop><Value>%PATHEXCEL%</Value><Variable>%PATHEXCEL%</Variable><Operation>varDirectoryWBS</Operation></prop><imgn>10</imgn></action><action GUID="7DIT8"><type>TModVarInfo</type><desc>Set &quot;%EXCELEXE%&quot; to this value &quot;%PATHEXCEL%excel.exe&quot;</desc><img>10</img><prop><Value>%PATHEXCEL%excel.exe</Value><Variable>%EXCELEXE%</Variable></prop><imgn>10</imgn></action><action GUID="8GJV8"><type>TCommentInfo</type><desc>&lt;FONT color=&quot;clGreen&quot;&gt;&lt;I&gt;Test x64&lt;/I&gt;&lt;/FONT&gt;</desc><img>30</img><prop><Comment>Test x64</Comment></prop><imgn>88</imgn></action><action GUID="DMQ2L"><type>TGetFileInfoInfo</type><desc>Test bitness of &quot;%EXCELEXE%&quot; (is x86?) and store result into &quot;%BIT%&quot;</desc><img>33</img><prop><ReturnVariable>%BIT%</ReturnVariable><InfoToGet>fiTestEXEx86</InfoToGet><FileName>%EXCELEXE%</FileName></prop><imgn>102</imgn></action><action GUID="4KHBG"><type>TCheckValInfo</type><desc>If %BIT% = 0 then</desc><img>20</img><prop><Variable1>%BIT%</Variable1><Variable2>0</Variable2><Operator>Equals</Operator></prop><imgn>87</imgn></action></pbgroup>

@gdgsupport,

This is extremely valuable code and it worked for me! Thanks so much! You guys are incredible!!!

Thanks

Dan

1 Like