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>
1
  • Could those that voted to close this question give a comment as to why they think it should be closed?
    – barlop
    Apr 20, 2016 at 8:58

1 Answer 1

0

Seems to be to do with the different ways i'd tried setting the vbsc extension.

I cannot explain how it happened but found a way to solve it which i'll explore.

To start with when I looked into changing association, I looked at 'default programs editor' and start.."change the file type associated with a specific extension" and making a .vbsc icon and choosing a program with open with, and assoc with ftype.

When I looked at the icon even after ftype was set to e.g. calc or charmap , the icon was not too oddly, set to an icon that looked like something that wasn't calc or charmap, it was wscript.exe or cscript.exe

No doubt the reason was that when setting an icon's association with 'open with' it changes the icon and so later changes with ftype hadn't. I don't care about the icon, but I figured maybe there was some other lingering association with cscript that might budge when I change it with open with. Maybe 'open with' is a bit stronger / more enforcing, than ftype.

I think 'open with' claimed it was set to calc too,but I figured maybe not set properly.. changed it to charmap and hey presto now typing the filename in cmd opened charmap and ftype updated too.

I have tried to retrigger the issue but the issue isn't retriggering, and ftype seems to be operating fine now. But if it happened again i'd know to create an icon with that extension and use 'open with', and let that do its thing and set ftype, and the association should be made properly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .