개요
유연한 가상화 기능은 앱이 일부 파일 및 레지스트리 항목 집합을 다른 앱에 표시해야 한다고 선언하는 방법을 제공합니다. 앱 제거에서 유지되어야 합니다. 다른 모든 파일 및 레지스트리 항목은 다른 앱에 표시되지 않습니다 . 제거될 때 제거됩니다.
선택한 위치의 가상화를 제어하는 방법
비고
이 섹션에 설명된 동작은 Windows 10 버전 21H1에서 도입되었습니다.
Windows 10 버전 21H1부터 시스템은 unvirtualizedResources 제한된 기능 및 RegistryWriteVirtualization 및 FilesystemWriteVirtualization 속성의 기존 동작을 유지합니다. 또한 시스템은 앱이 가상화 해제를 원하는 특정 폴더 및/또는 레지스트리 키를 선언할 수 있는 기능을 추가합니다.
- 내에
%USERPROFILE%\AppData있는 파일 시스템 위치만 선언할 수 있습니다. - HKCU 내에 있는 레지스트리 위치만 선언할 수 있습니다.
다음은 예제입니다.
<!-- Declare the desktop6 and/or virtualization XML namespace where the virtualization properties are defined, and include this in the list of ignorable namespaces. -->
<!-- Declare the XML namespace for the required restricted capability, and include it in the list of ignorable namespaces. -->
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:desktop6="http://schemas.microsoft.com/appx/manifest/desktop/windows10/6"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
xmlns:virtualization="http://schemas.microsoft.com/appx/manifest/virtualization/windows10"
IgnorableNamespaces="rescap desktop6 virtualization">
<!-- ... -->
<!-- Other entries omitted for brevity. -->
<!-- ... -->
<Properties>
<!-- If you don't want virtualization of registry writes to HKEY_CURRENT_USER, then include the property, and set it to disabled. -->
<desktop6:RegistryWriteVirtualization>disabled</desktop6:RegistryWriteVirtualization>
<!-- If you don't want virtualization of file system writes to the user's AppData folder, then include the property, and set it to disabled. -->
<desktop6:FileSystemWriteVirtualization>disabled</desktop6:FileSystemWriteVirtualization>
<!-- On Windows 10, version 21H1 and later OS versions, you can declare specific file system and/or registry locations that you want to be unvirtualized.
If these are recognized on the current device, then they take precedence over the old declarations. On older devices,
the new declarations are ignored and the old ones are honored. -->
<virtualization:FileSystemWriteVirtualization>
<virtualization:ExcludedDirectories>
<virtualization:ExcludedDirectory>$(KnownFolder:LocalAppData)\Fabrikam\Widgets</virtualization:ExcludedDirectory>
<virtualization:ExcludedDirectory>$(KnownFolder:RoamingAppData)\Fabrikam\Widgets</virtualization:ExcludedDirectory>
</virtualization:ExcludedDirectories>
</virtualization:FileSystemWriteVirtualization>
<virtualization:RegistryWriteVirtualization>
<virtualization:ExcludedKeys>
<virtualization:ExcludedKey>HKEY_CURRENT_USER\Software\Fabrikam\Widgets</virtualization:ExcludedKey>
</virtualization:ExcludedKeys>
</virtualization:RegistryWriteVirtualization>
</Properties>
<Capabilities>
<!-- Include the required restricted capability. -->
<rescap:Capability Name="unvirtualizedResources"/>
</Capabilities>
</Package>
비고
앱이 Windows 10 이전 버전 21H1 및 Windows 10 버전 21H1 구문을 모두 선언하는 경우 이전 선언은 Windows 10 이전 버전 21H1 버전에서 사용되고 새 선언은 Windows 10 이전 버전 21H1 이상에서 사용됩니다.
Windows 10 버전 21H1 이전의 메커니즘
기존 환경에서 앱은 파일 시스템의 대부분의 위치에서 파일을 만들고, 업데이트하고, 삭제할 수 있습니다. 또한 Windows 레지스트리에서 항목을 만들고, 업데이트하고, 삭제할 수 있습니다. 이러한 파일 및 레지스트리 항목은 종종 필요하지 않더라도 시스템의 다른 앱에 표시됩니다. 또한 앱이 제거되면 해당 파일 및 레지스트리 항목이 남아 있는 경우가 많으며 복잡해집니다.
UWP(유니버설 Windows 플랫폼)에서 이러한 파일 및 레지스트리 항목은 가상화되므로 파일을 작성하는 앱만 볼 수 있습니다. 그리고 앱이 제거되면 제거됩니다. 그러나 앱에서 이러한 파일 및 레지스트리 항목을 다른 앱에 표시하려는 유효한 시나리오가 있습니다. 또한 다른 앱에서는 파일을 작성한 앱이 제거된 후에도 해당 파일 및 항목이 유지되도록 요구할 수 있습니다.
기본 MSIX 동작
| 위치 | 컨텍스트 | 설명 |
|---|---|---|
| 홍콩국제공항 | 설치 시간 |
|
| 홍콩국제공항 | 런타임 |
|
| HKLM 님 | 설치 시간 |
|
| HKLM 님 | 런타임 |
|
| 잘 알려진 폴더 | 설치 시간 |
|
| 앱데이터 | 런타임 |
|
unvirtualizedResources 제한된 기능
비고
제한된 기능에 대한 unvirtualizedResources 지원은 Windows 10 버전 1903(10.0; 빌드 18362), Windows 10 2019년 5월 업데이트라고도 합니다.
앱은 unvirtualizedResources 제한된 기능을 선언하고 RegistryWriteVirtualization 및/또는 FilesystemWriteVirtualization 속성을 true로 설정하여 HKCU 및/또는 AppData에 대한 쓰기 액세스를 가져올 수 있습니다. 이는 앱이 패키지 외부의 다른 프로세스에 표시되는 항목을 작성해야 하는 경우를 활성화하기 위한 것입니다. 예를 들어 게임은 AppData에 저장 데이터를 쓰고, 해당 데이터는 게임을 제거한 후에도 유지되어야 합니다.
| 재산 | 설명 |
|---|---|
| RegistryWriteVirtualization=비활성화됨 | HKCU에 대한 쓰기는 비가상화된 위치로 이동하며, 패키지 외부의 다른 프로세스에 노출되며, 앱 제거 시 정리되지 않습니다. |
| FilesystemWriteVirtualization=비활성화됨 | AppData에 대한 쓰기는 비정상 위치로 이동하고 패키지 외부의 다른 프로세스에 표시되며 앱 제거 시 정리되지 않습니다. |
이 메커니즘은 기본 목표에 반하는 HKCU 및/또는 AppData 가상화를 완전히 해제합니다. 세분화된 도구가 아니며 지정된 앱의 요구 사항을 초과하는 경우가 많습니다.