Windows 10: Unable to associate extensions/file types with BAT scripts

Discus and support Unable to associate extensions/file types with BAT scripts in Windows 10 Software and Apps to solve the problem; Using the assoc and ftype commands, I was always been able to associate certain extensions/filetypes with certain Batch scripts. But, this didn't... Discussion in 'Windows 10 Software and Apps' started by jimtut, Aug 10, 2016.

  1. jimtut Win User

    Unable to associate extensions/file types with BAT scripts


    Using the assoc and ftype commands, I was always been able to associate certain extensions/filetypes with certain Batch scripts. But, this didn't appear to be be working in Windows 10.

    The following commands (run in a Admin command prompt) work fine in Windows 8.1 but not Windows 10:
    Code: assoc .foo=Foobar ftype Foobar=C:\WINDOWS\system32\foo.bat %1 echo @echo off > foo.bat echo echo The filename is %1>> foo.bat echo hi > foo.foo foo.foo[/quote]

    The result should be the output:
    Code: The filename is C:\WINDOWS\system32\foo.foo[/quote] Windows 10 appears to do nothing, but then I thought of changing the foo.bat script to redirect to a log file, so foo.bat now looks like this:
    Code: @echo off echo The filename is %1 > foo.log[/quote] When running foo.foo, foo.log is created, so we know that the file association (.foo files associated to foo.bat) is working and foo.bat is running. It's just that there's no output in the DOS window.

    Also, adding a "pause" command at the end of foo.bat does NOT pause at all, so this shows that input and output are both broken/redirected.

    What could be causing this input/output redirection? Remember, it only happens when running the foo.foo file directly. If you run "foo.bat foo.foo", it's fine.

    Thanks!


    :)
     
    jimtut, Aug 10, 2016
    #1
  2. RusTNel Win User

    File associations in Windows 10 not working

    Many of my file extensions are not pointing to the programs I need them to point. For example I create script files that are used by AutoCAD. The script file has an extension of .scr that I use a text editor program like Notepad to create it. When I upgraded
    to Windows 10 the .scr extension was set to open using the AutoCAD Script Editor. I tried to change the default program using a right click "Open With". However the "Open With" option was not available for this file type. I then tried: Right click on Start
    > Control Panel > Programs > Default Programs > Associate a file type or protocol with a program. I clicked on the .scr extension, clicked "Change Program" and it would not change. The only way I could get the file association to not be "AutoCAD Script Editor"
    was to Right click on Start > Run > regedit and delete all occurrences of the key .scr. After this I was able right click on the file and use "Open" to associate the file to Notepad. This worked, however, I think I'm missing a step. The "Open with" option
    is not available when I right click the file, like it is for other files. I would like to know what step I missed to get "Open with in the right click options.

    Also, many of the file extensions indicate "Unknown application" so I suspect this issue may be affecting over 350 file extensions. Does Microsoft have a fix to fix all these "Unknown application" issues?
     
    RusTNel, Aug 10, 2016
    #2
  3. DaveM121 Win User
    I have problem unassociating files in Win10, specifically WMP.

    Hi Bruce, it is hard in Windows to break file associations . . .

    Open File Explorer

    On the View Ribbon, check the box marked 'File Name Extensions' - so you can see the extension on a file

    On your Desktop, create a dummy file with a .bat or .exe file extension

    (Basically right click Desktop, choose New - Text document and change the file extension from .txt to .bat or .exe)

    Right click any zip file, choose open with - Choose another App

    Check the box marked 'Always use this app to open zip files' - IMPORTANT!

    Scroll to the bottom and click 'More Apps'

    Again scroll to the bottom and choose 'Find another app on this PC'

    Navigate to the dummy file on your Desktop

    The zip file will not open

    Delete the dummy file on your Desktop and restart your PC

    The file association will then be broken!
     
    DaveM121, Aug 10, 2016
    #3
  4. jimtut Win User

    Unable to associate extensions/file types with BAT scripts

    Looks like Microsoft changed the polarity of a setting in the registry for Windows 10, and there's a simple fix for it.

    https://social.msdn.microsoft.com/Fo...rum=windowssdk

    Set HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\InheritConsoleHandles to 0.
     
    jimtut, Aug 10, 2016
    #4
Thema:

Unable to associate extensions/file types with BAT scripts

Loading...
  1. Unable to associate extensions/file types with BAT scripts - Similar Threads - Unable associate extensions

  2. File Type Associations

    in Windows 10 Gaming
    File Type Associations: HELP!... Is it possible to Associate ALL file types a specific program can open without having to do it one at a time? As example Corel Paintshop Pro. How can you associate all files it can handle with one click? Use to be able to do it from the program itself but that no...
  3. File Type Associations

    in Windows 10 Software and Apps
    File Type Associations: HELP!... Is it possible to Associate ALL file types a specific program can open without having to do it one at a time? As example Corel Paintshop Pro. How can you associate all files it can handle with one click? Use to be able to do it from the program itself but that no...
  4. Bat script to select a folder and update the path in a bat file

    in Windows 10 Support
    Bat script to select a folder and update the path in a bat file: How do I combine this scripts? i want the highlighted folder path to been passed in to the script that's been generated (rensa_datafiler.bat) Its begins with you select a folder: @Echo off Title Folder Selection echo( Select folder . . . call:FolderSelection "%SourcePath%",...
  5. File type association

    in Windows 10 Customization
    File type association: I accidentally assigned a .laz extension to be opened automatically with Adobe. When I try to go to the default settings to remove the association I only get the option of associating with another app. How can I remove this entirely or restore it back to were I get a prompt...
  6. Associate file extensions to a program

    in Windows 10 Customization
    Associate file extensions to a program: I am trying to associate a jpg file to Adobe Photoshop in a Windows 10 process that appears to continually direct me to a Windows 10 default recommendation. I managed to find two columns showing an incredible number of extensions on the left and the apps or programs on the...
  7. File Extension and file type

    in Windows 10 Network and Sharing
    File Extension and file type: Recently I came to know the in some directories, all my file type and extension are changed to CAAVME File (.caavme). When I open, its not opening. There is a file in every directory with the name "CAAVME-DECRYPT" and it contents: ---= GANDCRAB V5.0.4 =---...
  8. program will not open- change file type associated with a file extension

    in Windows 10 Drivers and Hardware
    program will not open- change file type associated with a file extension: I went to control panel, file, and when I click on "change the file type associated with a file extension" the window opens with the blue screen and the file icon in the center but never actually opens up at all....
  9. File extension not in file association list

    in Windows 10 Software and Apps
    File extension not in file association list: Hello, I use Notepad++ to edit Python files which have the file extension .py such as "sample.py" I would like to set Notepad++ as the default program to open .py files. When I open a .py file I get the popup asking me which file I want to use to open. But I do not get...
  10. File association problem with .reg and .bat files

    in Windows 10 Support
    File association problem with .reg and .bat files: Asus laptop with WINDOWS 10 When double clicking a .reg file the default action is merge by running the regedit.exe. On the right-click content menu I have Merge (in bold), edit and print, select edit opens the notepad for editing. In order to prevent from merging the .reg...