﻿<?xml version='1.0' encoding='utf-8' standalone='yes'?>
<assembly
    xmlns="urn:schemas-microsoft-com:asm.v3"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    manifestVersion="1.0"
    >
  <assemblyIdentity
      language="neutral"
      name="Microsoft-CertificateServices-OCSP-ServerUpgrade-Replacement"
      processorArchitecture="*"
      version="1.0.0.0"
      versionScope="nonSxS"
      />
  <migration
      alwaysProcess="yes"
      replacementSettingsVersionRange="0"
      replacementVersionRange="6.1.*"
      settingsVersion="0"
      >
    <migXml xmlns="">
      <rules context="System">
        <include>
          <objectSet>
            <pattern type="Registry">HKLM\Software\Microsoft\ADCS\OCSP [ConfigurationStatus]</pattern>
          </objectSet>
        </include>
      </rules>
      <rules context="System">
        <detects>
          <detect>
            <!-- Detection of OCSP. -->
            <condition>MigXmlHelper.DoesObjectExist("File", "%systemroot%\system32\[ocspsvc.exe]")</condition>
          </detect>
          <detect>
            <!-- If the registry key doesn't exist, put a DWORD value of 2 -->
            <condition negation="Yes">MigXmlHelper.DoesObjectExist("Registry", "HKLM\Software\Microsoft\ADCS\OCSP [ConfigurationStatus]")</condition>
          </detect>
        </detects>
        <addObjects>
          <object>
            <location type="Registry">HKLM\Software\Microsoft\ADCS\OCSP [ConfigurationStatus]</location>
            <attributes>Dword</attributes>
            <bytes>02000000</bytes>
          </object>
        </addObjects>
        <include>
          <objectSet>
            <pattern type="Registry">HKLM\Software\Microsoft\ADCS\OCSP [ConfigurationStatus]</pattern>
          </objectSet>
        </include>
      </rules>
    </migXml>
  </migration>
</assembly>
