0

On my Windows-10 PC, there are some files with extension .dmupgrade. Those should be opened with the program C:\Program Files\<Company>\TaskbarUtility.exe.

I also have another version of TaskbarUtility.exe on my PC, in the directory C:\<Company>\Tools\TaskbarUtility\.

For an unknown reason, while double-clicking on the .dmupgrade file, the program C:\<Company>\Tools\TaskbarUtility\TaskbarUtility.exe gets opened, so I've tried to change this: I've right-clicked on the *.dmupgrade file, pressed the Change button at Opens with, I chose the file C:\Program Files\<Company>\TaskbarUtility.exe and pressed Ok.
While double-clicking, it seems that the program C:\<Company>\Tools\TaskbarUtility.exe is used again for opening the file.

I've been looking into the registry, at following location:

 Computer\
   HKEY_CURRENT_USER\
     Software\
       Microsoft\
         Windows\
           CurrentVersion\
             Explorer\
               FileExts\
                .dmupgrade\
                  OpenWithList

This only gives TaskbarUtility.exe as an answer (without any directory reference). The key HKEY_CLASSES_ROOT\.dmupgrade exists but is not filled in.

I've checked the PATH environment variable, and apparently the directory C:\<Company>\Tools is not present there.

I've checked the C:\Program Files\<Company>\Tools\TaskbarUtility.exe (using a Ubuntu emulator app), it is not a link to the other program:

Prompt>file TaskbarUtility.exe
TaskbarUtility.exe: PE32 executable (GUI) Intel 80386 Mono/.Net assembly, for MS Windows

So my question is: when I configure a file extension to be opened with a particular program, how does Windows know in which directory to look for this program? Is it possible to handle this using WMIC commands?

Thanks in advance

  • I'd also check with assoc .dmupgrade in a cmd window and look up the value with ftype. – LotPings Jun 28 '18 at 8:36
  • @LotPings: thanks. That solved my problem indeed. Please add your comment as an answer and I'll accept it. – Dominique Jun 28 '18 at 9:11
1

While some people disgrace assoc and ftype as useless in this related Q&A,
the above question is evidence for the opposite.

Both assoc and ftype are internal commands to cmd.exe

assoc /?
assoc.com /? 
assoc.exe /?
help assoc

Will return the same help text:

Displays or modifies file extension associations

ASSOC [.ext[=[fileType]]]

 .ext      Specifies the file extension to associate the file type with
 fileType  Specifies the file type to associate with the file extension

Type ASSOC without parameters to display the current file associations.
If ASSOC is invoked with just a file extension, it displays the current
file association for that file extension.  Specify nothing for the file
type and the command will delete the association for the file extension.

But there is no file present (So this doesn't work in PowerShell for example) Same applies for ftype.

To lookup what filetype is associated with an extension (here .txt):

> assoc .txt
.txt=txtfile

To lookup what command to open this filetype is used:

> ftype txtfile
txtfile=%SystemRoot%\system32\NOTEPAD.EXE %1

For other verbs you have to take the route over the registry

> Reg query "HKCR\txtfile" /S
HKEY_CLASSES_ROOT\txtfile
    (Default)    REG_SZ    Text Document
    EditFlags    REG_DWORD    0x210000
    FriendlyTypeName    REG_EXPAND_SZ    @%SystemRoot%\system32\notepad.exe,-469

HKEY_CLASSES_ROOT\txtfile\DefaultIcon
    (Default)    REG_EXPAND_SZ    %SystemRoot%\system32\imageres.dll,-102

HKEY_CLASSES_ROOT\txtfile\shell

HKEY_CLASSES_ROOT\txtfile\shell\open

HKEY_CLASSES_ROOT\txtfile\shell\open\command
    (Default)    REG_EXPAND_SZ    %SystemRoot%\system32\NOTEPAD.EXE %1

HKEY_CLASSES_ROOT\txtfile\shell\print

HKEY_CLASSES_ROOT\txtfile\shell\print\command
    (Default)    REG_EXPAND_SZ    %SystemRoot%\system32\NOTEPAD.EXE /p %1

HKEY_CLASSES_ROOT\txtfile\shell\printto

HKEY_CLASSES_ROOT\txtfile\shell\printto\command
    (Default)    REG_EXPAND_SZ    %SystemRoot%\system32\notepad.exe /pt "%1" "%2" "%3" "%4"

Edit: application to the original question:
Hereby the results of assoc and ftype before:

Prompt>assoc .dmupgrade
.dmupgrade=dmupgrade

Prompt>ftype dmupgrade
dmupgrade=C:\<Company>\Tools\TaskbarUtility\TaskbarUtility.exe "%l"

The following command has been launched:

Prompt>ftype dmupgrade=C:\Program Files\<Company>\TaskbarUtility.exe "%1"

This failed at first, because I needed to perform this as an administrator :-), but after opening an administrator prompt, my problem was solved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.