2
assoc and ftype, provide a mapping between extension and a program to launch for that extension. And for some reason, despite what I have specified by assoc and ftype, some other application is loading, so it seems the OS is reading its data(on what application to launch) , from elsewhere before even checking assoc and ftype
I have a file extension .vbsc which is associated with cscript and i'd like it associated with something else, even calc.exe I just want to be able to change the association but I don't seem to be able to. But I can for other extensions. Below is a demonstrartion.
In the demonstration, I use assoc and ftype to create an association for a file extension .ab5 and the demonstration shows that works. I then change the association so it brings up another program, the demonstration shows that works. I then try it with my problem extension, and it doesn't work. And it's not because my problem extension is 4 char long, there are many long extensions.
There is a second demonstration below this one which I describe where you scroll down to it. So it's reading something else before ftype.
C:\Users\user>assoc | grep -i vbsc
.vbsc=VBS_Cscr
C:\Users\user>assoc .ab5=AB5file
.ab5=AB5file
C:\Users\user>ftype AB5file=c:\windows\system32\calc.exe
AB5file=c:\windows\system32\calc.exe
C:\Users\user>echo asdf>a.ab5
C:\Users\user>a.ab5
C:\Users\user>rem the above brings up calculator
C:\Users\user>ftype AB5file=c:\windows\system32\charmap.exe
AB5file=c:\windows\system32\charmap.exe
C:\Users\user>a.ab5
C:\Users\user>rem the above things up charmap
C:\Users\user>abc.vbsc
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
Input Error: There is no script engine for file extension ".vbsc".
C:\Users\user>assoc | find /i "vbs"
.vbs=VBSFile
.vbsc=VBS_Cscr
C:\Users\user>ftype | find /i "vbs"
VBSFile=%SystemRoot%\System32\WScript.exe "%1" %*
VBS_Cscr=c:\windows\system32\calc.exe
C:\Users\user>
In this demonstration I delete the extension. It still associates with cscript.exe
Deleting the extension
C:\Windows\System32>assoc .vbsc=
C:\Windows\System32>ftype VBSFile=
C:\Windows\System32>aaa.vbsc
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
Input Error: There is no script engine for file extension ".vbsc".
C:\Windows\System32>
Could those that voted to close this question give a comment as to why they think it should be closed? – barlop – 2016-04-20T08:58:27.037