Sorry but the closest thing Opus has to internally abstracting the path to the program directory is probably the /programfiles folder alias... But I imagine that will resolve to the native 64bit directory on 64bit OS.
If it were ME... I might set up my own alias(es) that I could easily switch out the definition(s) of depending on what platform I was using.
For instance, for any programs that you know will appear in the "native" Program Files dir on each platform, perhaps change your buttons to use the /programfiles folder alias... but for those 32bit programs that you use that do NOT yet have 64bit versions - and which will end up in the "x86" folder on 64bit OS... I would probably set up my own folder alias called programs32 and use THAT folder alias to refer to all such programs in my buttons, hotkeys, etc.
Note: It would NOT automatically find the right file depending on the platform, but at least depending on whichever platform you were running on at a time, you could then just make a single change to your system that would affect many buttons etc...
As an example, here are a few sample buttons that show how this would basically work:
This first button toggles the folder alias configuration... Left mouse click copies a version of the folderaliases.oxc file back to the Opus ConfigFiles directory with the definition of /programs32 set to c:\prog32... while Right mouse clickcopies a version of the file with the definition of /programs32 set to c:\prog64. Each of the button configs then exit out of Opus so that the new config file will take effect:
<?xml version="1.0"?>
<button display="both" icon_size="large" label_pos="right" type="three_button">
<label>Swap Aliases</label>
<icon1>#outputwindow</icon1>
<button display="both" icon_size="large" label_pos="right">
<label>Swap Aliases 32</label>
<tip>Swap Aliases 32</tip>
<icon1>#outputwindow</icon1>
<function type="normal">
<instruction>Copy FORCE FILE C:\prog32\folderaliases.oxc TO /dopusdata\ConfigFiles</instruction>
<instruction>Close PROGRAM</instruction>
</function>
</button>
<button display="both" icon_size="large" label_pos="right">
<label>Swap Aliases 64</label>
<tip>Swap Aliases 64</tip>
<icon1>#outputwindow</icon1>
<function type="normal">
<instruction>Copy FORCE FILE C:\prog64\folderaliases.oxc TO /dopusdata\ConfigFiles</instruction>
<instruction>Close PROGRAM</instruction>
</function>
</button>
</button>
This next button then just shows you the change has indeed taken effect:
<?xml version="1.0"?>
<button display="both" icon_size="large" label_pos="right">
<label>Test Button</label>
<tip>Test Button</tip>
<icon1>#pathfield</icon1>
<function type="normal">
<instruction>{Rs|{alias|programs32}}</instruction>
</function>
</button>
If you want to test these buttons, create a prog32 and prog64 directory on your C: drive, add a folder alias called programs32 to your system set to c:\prog32, then goto the /dopusdata\ConfigFiles directory, and copy your current folderaliases.oxc to both the c:\prog32 and c:\prog64 directories in the attached zip file, then just edit the one in the prog64 dir so that the programs32 points to c:\prog64. Then play around...
This is a fairly HACK-ISH way to go about doing this though - since you'd need to keep copies of the folderaliases.oxc file updated with your latest system changes to avoid overwriting NEW folder aliases with an OLD copy of the file. I just submitted a feature request to GPSoft to provide something like a Set ALIAS/M type command so we can change aliases programatically and have them take effect without having to exit and restart Opus. There are times when I would use this in USB portable export use cases - though the addition of the recent /homeroot alias solved alot of the need for that.
EDIT NOTE: Leo's suggestion of environment variable use would be good if it is indeed available - maybe you can define that environment variable yourself so that it's always valid (even on older Vista or WinXP installs). My suggestion was basically to do this sort of thing just confined within OPUS, but as I said it's rather hack-ish...