How to get rid of some (Mac) Shared Apps in Windows Explorer "Open With" Menu

Discussion in 'Windows Virtual Machine' started by MeyerJ, Oct 30, 2021.

  1. MeyerJ

    MeyerJ Junior Member

    Messages:
    18
    I have created a new Windows 11 virtual machine from scratch with the configuration "Share Mac programs with Windows" enabled. After the installation of Parallels Tools I found the links to the Mac apps as expected in "C:\Users\<useraccount>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Parallels Shared Applications\*.lnk". The windows stub applications are located in "C:\Users\<useraccount>\AppData\Roaming\Parallels\Shared Applications\*.exe".

    To be honest: I only need only one of these shared applications and: extremly annoying are the (in my opinion) "* (Mac)"-applications in the windows "Open With" submenu of windows explorer.

    So I googled how to get rid of the (in my opinion) needless Mac apps and tried some of the solutions found there:

    • Deleting all *.lnk files in ".... Windows\Start Menu\Programs\Parallels Shared Applications" and
    • Deleting all *.exe files in ".... AppData\Roaming\Parallels\Shared Applications"

    The result immediatly after these actions was, that the undesired applications have vanished from the "Open With" menu - everything seemed to be o.k.. But after logging of and logging in again all entries had been reconstructed (I suppose by Parallels Tools).

    Second try was: I started the windows Registry Editor with administrator privilege and went to "Computer\HKEY_CLASSES_ROOT\Applications\". For all undesired Mac apps I deleted the file types I did'nt want to use, i.e for the Extension ".jpg" and the Mac app "Preview (Mac)" I deleted the entry:

    Computer\HKEY_CLASSES_ROOT\Applications\Preview (Mac).exe\SupportedTypes\.jpg

    The result immediatly after these actions was, that for these file types the according Mac apps have vanished from the "Open With" menu - everything seemed to be o.k.. But after logging of and logging in again all entries had been reconstructed (I suppose by Parallels Tools).

    Even deleting the entries "Computer\HKEY_CLASSES_ROOT\Applications\**** (Mac).exe" completely led to the the same result.

    It seems, that Parallels tools always checks and reconstructs (if necessary from the view of Paralles Tools) the complete Mac app behaviour after logging in again.

    Has anyone an functioning solution for this problem? Thank you in advance for your assistance ...
     
  2. MeyerJ

    MeyerJ Junior Member

    Messages:
    18
    ... OK folks - I found a solution: I wrote a VBS-Script and copied it into "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup". Therefore this Script will be executed after login of each user. You find the Script-file (packed into a ZIP-file) attached to this post and and its content as text following:

    Option Explicit

    Dim objWshShell
    Dim objFileSystem
    Dim REGFolder
    Dim REGFile
    Dim objREGFile

    Const ForWriting = 2
    Const TemporaryFolder = 2

    Set objWshShell = WScript.CreateObject("WScript.Shell")
    Set objFileSystem = CreateObject("Scripting.FileSystemObject")

    REGFolder = objFileSystem.GetSpecialFolder(TemporaryFolder)
    REGFile = REGFolder & "\" & Replace (objFileSystem.GetTempName (), ".tmp", ".reg")
    Set objREGFile = objFileSystem.OpenTextFile (REGFile, ForWriting, True)

    With objREGFile
    .WriteLine ("Windows Registry Editor Version 5.00")
    .WriteLine ("")
    .WriteLine ("[-HKEY_CLASSES_ROOT\Applications\Adobe Acrobat Reader DC (Mac).exe]")
    .WriteLine ("")
    .WriteLine ("[HKEY_CLASSES_ROOT\Applications\Books (Mac).exe\SupportedTypes]")
    .WriteLine (""".pdf""=-")
    .WriteLine ("")
    .WriteLine ("[HKEY_CLASSES_ROOT\Applications\Calendar (Mac).exe\SupportedTypes]")
    .WriteLine (""".ics""=-")
    .WriteLine ("")
    .WriteLine ("[HKEY_CLASSES_ROOT\Applications\Contacts (Mac).exe\SupportedTypes]")
    .WriteLine (""".vcf""=-")
    .WriteLine ("")
    .WriteLine ("[HKEY_CLASSES_ROOT\Applications\ColorSync Utility (Mac).exe\SupportedTypes]")
    .WriteLine (""".bmp""=-")
    .WriteLine (""".gif""=-")
    .WriteLine (""".jpeg""=-")
    .WriteLine (""".jpg""=-")
    .WriteLine (""".pdf""=-")
    .WriteLine (""".png""=-")
    .WriteLine (""".tif""=-")
    .WriteLine (""".tiff""=-")
    .WriteLine ("")
    .WriteLine ("[-HKEY_CLASSES_ROOT\Applications\Microsoft Excel (Mac).exe]")
    .WriteLine ("")
    .WriteLine ("[HKEY_CLASSES_ROOT\Applications\Preview (Mac).exe\SupportedTypes]")
    .WriteLine (""".bmp""=-")
    .WriteLine (""".gif""=-")
    .WriteLine (""".icns""=-")
    .WriteLine (""".ico""=-")
    .WriteLine (""".jpeg""=-")
    .WriteLine (""".jpg""=-")
    .WriteLine (""".pdf""=-")
    .WriteLine (""".png""=-")
    .WriteLine (""".tif""=-")
    .WriteLine (""".tiff""=-")
    .WriteLine (""".webp""=-")
    .WriteLine ("")
    .WriteLine ("[HKEY_CLASSES_ROOT\Applications\Safari (Mac).exe\SupportedTypes]")
    .WriteLine (""".gif""=-")
    .WriteLine (""".ico""=-")
    .WriteLine (""".jpeg""=-")
    .WriteLine (""".jpg""=-")
    .WriteLine (""".pdf""=-")
    .WriteLine (""".png""=-")
    .WriteLine (""".tif""=-")
    .WriteLine (""".tiff""=-")
    .WriteLine (""".txt""=-")
    .WriteLine (""".text""=-")
    .WriteLine (""".svg""=-")
    .WriteLine (""".xml""=-")
    .WriteLine ("")
    .WriteLine ("[-HKEY_CLASSES_ROOT\Applications\Script Editor (Mac).exe]")
    .WriteLine ("")
    .WriteLine ("[HKEY_CLASSES_ROOT\Applications\System Information (Mac).exe\SupportedTypes]")
    .WriteLine (""".txt""=-")
    .WriteLine ("")
    .WriteLine ("[-HKEY_CLASSES_ROOT\Applications\TextEdit (Mac).exe]")
    .WriteLine ("")
    .WriteLine ("[HKEY_CLASSES_ROOT\Applications\QuickTime Player (Mac).exe\SupportedTypes]")
    .WriteLine (""".jpeg""=-")
    .WriteLine (""".jpg""=-")
    .WriteLine (""".png""=-")
    .WriteLine (""".tif""=-")
    .WriteLine (""".tiff""=-")
    .WriteLine ("")
    .WriteLine ("[HKEY_CLASSES_ROOT\Applications\VeraCrypt (Mac).exe\SupportedTypes]")
    .WriteLine (""".hc""=-")
    .WriteLine (""".tc""=-")
    .WriteLine ("")
    .WriteLine ("[-HKEY_CLASSES_ROOT\Applications\Microsoft Word (Mac).exe]")
    '.WriteLine ("")
    '.WriteLine ("[HKEY_CLASSES_ROOT\Applications\firefox.exe\SupportedTypes]")
    '.WriteLine (""".gif""=-")
    '.WriteLine (""".ico""=-")
    '.WriteLine (""".jpeg""=-")
    '.WriteLine (""".jpg""=-")
    '.WriteLine (""".png""=-")
    '.WriteLine (""".svg""=-")
    '.WriteLine (""".webp""=-")
    .Close
    End With

    objWshShell.run "reg import """ & REGFile & """", , True
    objFileSystem.DeleteFile REGFile, True

    WScript.Quit
     

    Attached Files:

Share This Page