Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

how to determine which program will execute a file

Jun
137
3
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.
 
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.
 
I don't know whether this is relevant or not, but have you tried ASSOC /U and FTYPE /U ?
 
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.
 
Also remember, that an executable extension takes priority over the program selected by assoc / ftype.

Yes, Steve, you're right. However, what I don't know is how executable extension determines what is to be run. I couldn't find that information anywhere.
 
Code:
set .vbc

Ding ding ding! We have a winner! Charles, you're a genius. I new a lot about this area, but that's one that I had completely forgotten. I found I had buried it in my tcstart.btm file. I changed it, and now it works. Thank you!
 

Similar threads

Back
Top