вторник, 5 марта 2019 г.

Вернуть Windows Photo Viewer в Windows 10.

После установки Windows 10, стандартным приложением для просмотра графических файлов является... в общем, не тот самый Windows Photo Viewer.
Если вы не используете какой-то нестандартный софт, то пользователи могут быть немного удивлены.

Начать нужно с того, что Windows Photo Viewer нужно "включить" в системе. Для этого нужно проделать небольшие правки в реестре. Сохраните код ниже, как .reg файл:


 Windows Registry Editor Version 5.00  
   
 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Photo Viewer\Capabilities\FileAssociations]  
 ".jpg"="PhotoViewer.FileAssoc.Jpeg"  
 ".wdp"="PhotoViewer.FileAssoc.Wdp"  
 ".jfif"="PhotoViewer.FileAssoc.JFIF"  
 ".dib"="PhotoViewer.FileAssoc.Bitmap"  
 ".png"="PhotoViewer.FileAssoc.Png"  
 ".jxr"="PhotoViewer.FileAssoc.Wdp"  
 ".bmp"="PhotoViewer.FileAssoc.Bitmap"  
 ".jpe"="PhotoViewer.FileAssoc.Jpeg"  
 ".jpeg"="PhotoViewer.FileAssoc.Jpeg"  
 ".gif"="PhotoViewer.FileAssoc.Gif"  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Bitmap]  
 "ImageOptionFlags"=dword:00000001  
 "FriendlyTypeName"=hex(2):40,00,25,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,\  
  00,46,00,69,00,6c,00,65,00,73,00,25,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,\  
  77,00,73,00,20,00,50,00,68,00,6f,00,74,00,6f,00,20,00,56,00,69,00,65,00,77,\  
  00,65,00,72,00,5c,00,50,00,68,00,6f,00,74,00,6f,00,56,00,69,00,65,00,77,00,\  
  65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,33,00,30,00,35,00,36,00,00,\  
  00  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Bitmap\DefaultIcon]  
 @="%SystemRoot%\\System32\\imageres.dll,-70"  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Bitmap\shell]  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Bitmap\shell\open]  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Bitmap\shell\open\command]  
 @=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\  
  00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,72,00,75,00,\  
  6e,00,64,00,6c,00,6c,00,33,00,32,00,2e,00,65,00,78,00,65,00,20,00,22,00,25,\  
  00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,\  
  25,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,20,00,50,00,68,00,6f,\  
  00,74,00,6f,00,20,00,56,00,69,00,65,00,77,00,65,00,72,00,5c,00,50,00,68,00,\  
  6f,00,74,00,6f,00,56,00,69,00,65,00,77,00,65,00,72,00,2e,00,64,00,6c,00,6c,\  
  00,22,00,2c,00,20,00,49,00,6d,00,61,00,67,00,65,00,56,00,69,00,65,00,77,00,\  
  5f,00,46,00,75,00,6c,00,6c,00,73,00,63,00,72,00,65,00,65,00,6e,00,20,00,25,\  
  00,31,00,00,00  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Bitmap\shell\open\DropTarget]  
 "Clsid"="{FFE2A43C-56B9-4bf5-9A79-CC6D4285608A}"  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.JFIF]  
 "EditFlags"=dword:00010000  
 "ImageOptionFlags"=dword:00000001  
 "FriendlyTypeName"=hex(2):40,00,25,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,\  
  00,46,00,69,00,6c,00,65,00,73,00,25,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,\  
  77,00,73,00,20,00,50,00,68,00,6f,00,74,00,6f,00,20,00,56,00,69,00,65,00,77,\  
  00,65,00,72,00,5c,00,50,00,68,00,6f,00,74,00,6f,00,56,00,69,00,65,00,77,00,\  
  65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,33,00,30,00,35,00,35,00,00,\  
  00  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.JFIF\DefaultIcon]  
 @="%SystemRoot%\\System32\\imageres.dll,-72"  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.JFIF\shell]  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.JFIF\shell\open]  
 "MuiVerb"=hex(2):40,00,25,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,\  
  69,00,6c,00,65,00,73,00,25,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,\  
  00,20,00,50,00,68,00,6f,00,74,00,6f,00,20,00,56,00,69,00,65,00,77,00,65,00,\  
  72,00,5c,00,70,00,68,00,6f,00,74,00,6f,00,76,00,69,00,65,00,77,00,65,00,72,\  
  00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,33,00,30,00,34,00,33,00,00,00  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.JFIF\shell\open\command]  
 @=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\  
  00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,72,00,75,00,\  
  6e,00,64,00,6c,00,6c,00,33,00,32,00,2e,00,65,00,78,00,65,00,20,00,22,00,25,\  
  00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,\  
  25,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,20,00,50,00,68,00,6f,\  
  00,74,00,6f,00,20,00,56,00,69,00,65,00,77,00,65,00,72,00,5c,00,50,00,68,00,\  
  6f,00,74,00,6f,00,56,00,69,00,65,00,77,00,65,00,72,00,2e,00,64,00,6c,00,6c,\  
  00,22,00,2c,00,20,00,49,00,6d,00,61,00,67,00,65,00,56,00,69,00,65,00,77,00,\  
  5f,00,46,00,75,00,6c,00,6c,00,73,00,63,00,72,00,65,00,65,00,6e,00,20,00,25,\  
  00,31,00,00,00  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.JFIF\shell\open\DropTarget]  
 "Clsid"="{FFE2A43C-56B9-4bf5-9A79-CC6D4285608A}"  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Jpeg]  
 "EditFlags"=dword:00010000  
 "ImageOptionFlags"=dword:00000001  
 "FriendlyTypeName"=hex(2):40,00,25,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,\  
  00,46,00,69,00,6c,00,65,00,73,00,25,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,\  
  77,00,73,00,20,00,50,00,68,00,6f,00,74,00,6f,00,20,00,56,00,69,00,65,00,77,\  
  00,65,00,72,00,5c,00,50,00,68,00,6f,00,74,00,6f,00,56,00,69,00,65,00,77,00,\  
  65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,33,00,30,00,35,00,35,00,00,\  
  00  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Jpeg\DefaultIcon]  
 @="%SystemRoot%\\System32\\imageres.dll,-72"  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Jpeg\shell]  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Jpeg\shell\open]  
 "MuiVerb"=hex(2):40,00,25,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,\  
  69,00,6c,00,65,00,73,00,25,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,\  
  00,20,00,50,00,68,00,6f,00,74,00,6f,00,20,00,56,00,69,00,65,00,77,00,65,00,\  
  72,00,5c,00,70,00,68,00,6f,00,74,00,6f,00,76,00,69,00,65,00,77,00,65,00,72,\  
  00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,33,00,30,00,34,00,33,00,00,00  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Jpeg\shell\open\command]  
 @=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\  
  00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,72,00,75,00,\  
  6e,00,64,00,6c,00,6c,00,33,00,32,00,2e,00,65,00,78,00,65,00,20,00,22,00,25,\  
  00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,\  
  25,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,20,00,50,00,68,00,6f,\  
  00,74,00,6f,00,20,00,56,00,69,00,65,00,77,00,65,00,72,00,5c,00,50,00,68,00,\  
  6f,00,74,00,6f,00,56,00,69,00,65,00,77,00,65,00,72,00,2e,00,64,00,6c,00,6c,\  
  00,22,00,2c,00,20,00,49,00,6d,00,61,00,67,00,65,00,56,00,69,00,65,00,77,00,\  
  5f,00,46,00,75,00,6c,00,6c,00,73,00,63,00,72,00,65,00,65,00,6e,00,20,00,25,\  
  00,31,00,00,00  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Jpeg\shell\open\DropTarget]  
 "Clsid"="{FFE2A43C-56B9-4bf5-9A79-CC6D4285608A}"  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Gif]  
 "ImageOptionFlags"=dword:00000001  
 "FriendlyTypeName"=hex(2):40,00,25,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,\  
  00,46,00,69,00,6c,00,65,00,73,00,25,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,\  
  77,00,73,00,20,00,50,00,68,00,6f,00,74,00,6f,00,20,00,56,00,69,00,65,00,77,\  
  00,65,00,72,00,5c,00,50,00,68,00,6f,00,74,00,6f,00,56,00,69,00,65,00,77,00,\  
  65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,33,00,30,00,35,00,37,00,00,\  
  00  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Gif\DefaultIcon]  
 @="%SystemRoot%\\System32\\imageres.dll,-83"  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Gif\shell]  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Gif\shell\open]  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Gif\shell\open\command]  
 @=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\  
  00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,72,00,75,00,\  
  6e,00,64,00,6c,00,6c,00,33,00,32,00,2e,00,65,00,78,00,65,00,20,00,22,00,25,\  
  00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,\  
  25,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,20,00,50,00,68,00,6f,\  
  00,74,00,6f,00,20,00,56,00,69,00,65,00,77,00,65,00,72,00,5c,00,50,00,68,00,\  
  6f,00,74,00,6f,00,56,00,69,00,65,00,77,00,65,00,72,00,2e,00,64,00,6c,00,6c,\  
  00,22,00,2c,00,20,00,49,00,6d,00,61,00,67,00,65,00,56,00,69,00,65,00,77,00,\  
  5f,00,46,00,75,00,6c,00,6c,00,73,00,63,00,72,00,65,00,65,00,6e,00,20,00,25,\  
  00,31,00,00,00  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Gif\shell\open\DropTarget]  
 "Clsid"="{FFE2A43C-56B9-4bf5-9A79-CC6D4285608A}"  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Png]  
 "ImageOptionFlags"=dword:00000001  
 "FriendlyTypeName"=hex(2):40,00,25,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,\  
  00,46,00,69,00,6c,00,65,00,73,00,25,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,\  
  77,00,73,00,20,00,50,00,68,00,6f,00,74,00,6f,00,20,00,56,00,69,00,65,00,77,\  
  00,65,00,72,00,5c,00,50,00,68,00,6f,00,74,00,6f,00,56,00,69,00,65,00,77,00,\  
  65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,33,00,30,00,35,00,37,00,00,\  
  00  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Png\DefaultIcon]  
 @="%SystemRoot%\\System32\\imageres.dll,-71"  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Png\shell]  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Png\shell\open]  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Png\shell\open\command]  
 @=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\  
  00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,72,00,75,00,\  
  6e,00,64,00,6c,00,6c,00,33,00,32,00,2e,00,65,00,78,00,65,00,20,00,22,00,25,\  
  00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,\  
  25,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,20,00,50,00,68,00,6f,\  
  00,74,00,6f,00,20,00,56,00,69,00,65,00,77,00,65,00,72,00,5c,00,50,00,68,00,\  
  6f,00,74,00,6f,00,56,00,69,00,65,00,77,00,65,00,72,00,2e,00,64,00,6c,00,6c,\  
  00,22,00,2c,00,20,00,49,00,6d,00,61,00,67,00,65,00,56,00,69,00,65,00,77,00,\  
  5f,00,46,00,75,00,6c,00,6c,00,73,00,63,00,72,00,65,00,65,00,6e,00,20,00,25,\  
  00,31,00,00,00  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Png\shell\open\DropTarget]  
 "Clsid"="{FFE2A43C-56B9-4bf5-9A79-CC6D4285608A}"  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Wdp]  
 "EditFlags"=dword:00010000  
 "ImageOptionFlags"=dword:00000001  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Wdp\DefaultIcon]  
 @="%SystemRoot%\\System32\\wmphoto.dll,-400"  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Wdp\shell]  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Wdp\shell\open]  
 "MuiVerb"=hex(2):40,00,25,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,\  
  69,00,6c,00,65,00,73,00,25,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,\  
  00,20,00,50,00,68,00,6f,00,74,00,6f,00,20,00,56,00,69,00,65,00,77,00,65,00,\  
  72,00,5c,00,70,00,68,00,6f,00,74,00,6f,00,76,00,69,00,65,00,77,00,65,00,72,\  
  00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,33,00,30,00,34,00,33,00,00,00  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Wdp\shell\open\command]  
 @=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\  
  00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,72,00,75,00,\  
  6e,00,64,00,6c,00,6c,00,33,00,32,00,2e,00,65,00,78,00,65,00,20,00,22,00,25,\  
  00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,\  
  25,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,20,00,50,00,68,00,6f,\  
  00,74,00,6f,00,20,00,56,00,69,00,65,00,77,00,65,00,72,00,5c,00,50,00,68,00,\  
  6f,00,74,00,6f,00,56,00,69,00,65,00,77,00,65,00,72,00,2e,00,64,00,6c,00,6c,\  
  00,22,00,2c,00,20,00,49,00,6d,00,61,00,67,00,65,00,56,00,69,00,65,00,77,00,\  
  5f,00,46,00,75,00,6c,00,6c,00,73,00,63,00,72,00,65,00,65,00,6e,00,20,00,25,\  
  00,31,00,00,00  
   
 [HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Wdp\shell\open\DropTarget]  
 "Clsid"="{FFE2A43C-56B9-4bf5-9A79-CC6D4285608A}"  
   
 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Photo Viewer]  
   
 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Photo Viewer\Capabilities]  
 "ApplicationDescription"="@%ProgramFiles%\\Windows Photo Viewer\\photoviewer.dll,-3069"  
 "ApplicationName"="@%ProgramFiles%\\Windows Photo Viewer\\photoviewer.dll,-3009"  
   

После импорта .reg файла необходимо добавить ассоциации. В Windows 10 правка реестра для ассоциаций файлов является не очень корректным методом. Работать будет, но регулярно будет сыпать алерты, что ассоциации сброшены/настроены некорректно.

Для выгрузки стандартного полного xml файла ассоциаций можно взять чистую систему, включить на ней через реестр Windows Photo Viewer, возможно, подправить что-то еще и сделать выгрузку файла ассоциаций в xml
Dism.exe /Online /Export-DefaultAppAssociations:C:\defapp-custom.xml
На выходе получаем примерно такое содержимое:

 <?xml version="1.0" encoding="UTF-8"?>  
 <DefaultAssociations>  
  <Association Identifier=".3g2" ProgId="WMP11.AssocFile.3G2" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".3gp" ProgId="WMP11.AssocFile.3GP" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".3gp2" ProgId="WMP11.AssocFile.3G2" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".3gpp" ProgId="WMP11.AssocFile.3GP" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".aac" ProgId="WMP11.AssocFile.ADTS" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".adt" ProgId="WMP11.AssocFile.ADTS" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".adts" ProgId="WMP11.AssocFile.ADTS" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".avi" ProgId="WMP11.AssocFile.AVI" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".bmp" ProgId="PhotoViewer.FileAssoc.Bitmap" ApplicationName="Просмотр фотографий Windows" />  
  <Association Identifier=".dib" ProgId="PhotoViewer.FileAssoc.Bitmap" ApplicationName="Просмотр фотографий Windows" />  
  <Association Identifier=".flac" ProgId="WMP11.AssocFile.FLAC" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".gif" ProgId="PhotoViewer.FileAssoc.Gif" ApplicationName="Просмотр фотографий Windows" />  
  <Association Identifier=".htm" ProgId="IE.AssocFile.HTM" ApplicationName="Internet Explorer" />  
  <Association Identifier=".html" ProgId="IE.AssocFile.HTM" ApplicationName="Internet Explorer" />  
  <Association Identifier=".jfif" ProgId="PhotoViewer.FileAssoc.JFIF" ApplicationName="Просмотр фотографий Windows" />  
  <Association Identifier=".jpe" ProgId="PhotoViewer.FileAssoc.Jpeg" ApplicationName="Просмотр фотографий Windows" />  
  <Association Identifier=".jpeg" ProgId="PhotoViewer.FileAssoc.Jpeg" ApplicationName="Просмотр фотографий Windows" />  
  <Association Identifier=".jpg" ProgId="PhotoViewer.FileAssoc.Jpeg" ApplicationName="Просмотр фотографий Windows" />  
  <Association Identifier=".jxr" ProgId="PhotoViewer.FileAssoc.Wdp" ApplicationName="Просмотр фотографий Windows" />  
  <Association Identifier=".m2t" ProgId="WMP11.AssocFile.M2TS" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".m2ts" ProgId="WMP11.AssocFile.M2TS" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".m3u" ProgId="WMP11.AssocFile.m3u" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".m4a" ProgId="WMP11.AssocFile.M4A" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".m4v" ProgId="WMP11.AssocFile.MP4" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".mkv" ProgId="WMP11.AssocFile.MKV" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".mod" ProgId="WMP11.AssocFile.MPEG" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".mov" ProgId="WMP11.AssocFile.MOV" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".MP2" ProgId="WMP11.AssocFile.MP3" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".mp3" ProgId="WMP11.AssocFile.MP3" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".mp4" ProgId="WMP11.AssocFile.MP4" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".mp4v" ProgId="WMP11.AssocFile.MP4" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".mpa" ProgId="WMP11.AssocFile.MPEG" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".MPE" ProgId="WMP11.AssocFile.MPEG" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".mpeg" ProgId="WMP11.AssocFile.MPEG" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".mpg" ProgId="WMP11.AssocFile.MPEG" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".mpv2" ProgId="WMP11.AssocFile.MPEG" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".mts" ProgId="WMP11.AssocFile.M2TS" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".png" ProgId="PhotoViewer.FileAssoc.Png" ApplicationName="Просмотр фотографий Windows" />  
  <Association Identifier=".tif" ProgId="TIFImage.Document" ApplicationName="Просмотр фотографий Windows" />  
  <Association Identifier=".tiff" ProgId="TIFImage.Document" ApplicationName="Просмотр фотографий Windows" />  
  <Association Identifier=".TS" ProgId="WMP11.AssocFile.TTS" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".TTS" ProgId="WMP11.AssocFile.TTS" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".txt" ProgId="txtfile" ApplicationName="Блокнот" />  
  <Association Identifier=".url" ProgId="IE.AssocFile.URL" ApplicationName="Браузер" />  
  <Association Identifier=".wav" ProgId="WMP11.AssocFile.WAV" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".wdp" ProgId="PhotoViewer.FileAssoc.Wdp" ApplicationName="Просмотр фотографий Windows" />  
  <Association Identifier=".website" ProgId="IE.AssocFile.WEBSITE" ApplicationName="Internet Explorer" />  
  <Association Identifier=".wm" ProgId="WMP11.AssocFile.ASF" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".wma" ProgId="WMP11.AssocFile.WMA" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".wmv" ProgId="WMP11.AssocFile.WMV" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier=".WPL" ProgId="WMP11.AssocFile.WPL" ApplicationName="Проигрыватель Windows Media" />  
  <Association Identifier="http" ProgId="IE.HTTP" ApplicationName="Internet Explorer" />  
  <Association Identifier="https" ProgId="IE.HTTPS" ApplicationName="Internet Explorer" />  
 </DefaultAssociations>  

А далее берем SCCM, собираем пакет, кладем в него наш .reg файл, xml файл и, например, .bat (который мы и будем использовать как command line в program у пакета) файл такого содержимого:

 regedit.exe /s %~dp0photoviewer-assoc.reg  
 dism.exe /online /Import-DefaultAppAssociations:"%~dp0defapp-custom.xml"  

Имена файлов, естественно, ставим нужные. Про %~dp0, надеюсь, объяснять не нужно, но гугл, если что, знает.

Добавляем установку нашего пакета в Task Sequence после шага Setup Windows and Configuration Manager, радуемся полученному результату.


Комментариев нет:

Отправить комментарий