how to determine which program will execute a file

#1
A variation of this came up in a previous thread from a month or two ago, but I've now run into this same problem in a different light. I've got a vbscript file, IsmInfo.vbc, that I want to execute. I'm running in a TCC.exe (64-bit) window on Windows 7-64. I don't understand what determines where it finds the executable program to run.

Code:
->which isminfo
isminfo is an executable extension : C:\Windows\system32\cscript.exe /nologo c:\Utils\IsmInfo.vbc
 
->assoc .vbc
.VBC=VBCFile
 
->ftype vbcfile
vbcfile=C:\Windows\SysWow64\CScript.exe /nologo "%1" %*
 
->set pathext
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
I've even searched my registry to see if I could figure out why it's picking the system32 version instead of the syswow64 version, and nothing I see there tells me anything.

Another interesting tidbit is that if I start up cmd.exe, whether the 32-bit or 64-bit version (using the Windows Run... option of course), both of them run the 32-bit (syswow64) version of cscript.exe.

Just in case there was any doubt, I thought I would add that if I manually use the 32-bit version of cscript.exe (c:\Windows\SysWow64\cscript.exe /nologo c:\utils\IsmInfo.vbc) within tcc.exe, of course this works fine.
 
#6
Don't know if this helps, but on my system vbc is not defined, but vbs is and all the above commands point to the system32 version.
You're right - vbc is a special file type that I've created for vbscript files that are to be processed through cscript instead of wscript. Note that I want it to use the SysWow64 version, not the system32 version, because I specifically need 32-bit processing, not 64.