<commit_before><?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:fw="http://schemas.microsoft.com/wix/FirewallExtension">
  <?if $(sys.BUILDARCH)=x64 ?>
    <?define PlatformProgramFiles = "ProgramFiles64Folder" ?>
  <?else ?>
    <?define PlatformProgramFiles = "ProgramFilesFolder" ?>
  <?endif ?>

  <Product Id="*" UpgradeCode="66a6eb5b-1fc2-4b14-a362-5ceec6413308" 
           Name="WMI Exporter" Version="$(var.Version)" Manufacturer="<NAME>" 
           Language="1033" Codepage="1252">
    <Package Id="*" Manufacturer="<NAME>" InstallScope="perMachine" 
             Description="WMI Exporter $(var.Version) installer" Compressed="yes" />
    <Media Id="1" Cabinet="wmi_exporter.cab" EmbedCab="yes"/>
    <MajorUpgrade Schedule="afterInstallExecute" DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit." />

    <Property Id="ENABLED_COLLECTORS" Secure="yes"/>
    <SetProperty Id="CollectorsFlag" After="InstallFiles" Sequence="execute" Value="-collectors.enabled [ENABLED_COLLECTORS]">ENABLED_COLLECTORS</SetProperty>

    <Property Id="LISTEN_ADDR" Secure="yes" />
    <Property Id="LISTEN_PORT" Secure="yes" Value="9182" />
    <SetProperty Id="ListenFlag" After="InstallFiles" Sequence="execute" Value="-telemetry.addr [LISTEN_ADDR]:[LISTEN_PORT]">LISTEN_ADDR OR LISTEN_PORT</SetProperty>

    <Property Id="METRICS_PATH" Secure="yes"/>
    <SetProperty Id="MetricsPathFlag" After="InstallFiles" Sequence="execute" Value="-telemetry.path [METRICS_PATH]">METRICS_PATH</SetProperty>

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="$(var.PlatformProgramFiles)">
        <Directory Id="APPLICATIONROOTDIRECTORY" Name="wmi_exporter" />
      </Directory>
    </Directory>

    <ComponentGroup Id="Files" Directory="APPLICATIONROOTDIRECTORY">
      <Component>
        <File Id="wmi_exporter.exe" Name="wmi_exporter.exe" Source="Work\wmi_exporter.exe" KeyPath="yes">
          <fw:FirewallException Id="MetricsEndpoint" Name="WMI Exporter (HTTP [LISTEN_PORT])" Description="WMI Exporter HTTP endpoint" Port="[LISTEN_PORT]" Protocol="tcp" Scope="any" IgnoreFailure="yes" />
        </File>
        <ServiceInstall Id="InstallExporterService" Name="wmi_exporter" ErrorControl="normal" Start="auto" Type="ownProcess" Arguments="-log.format logger:eventlog?name=wmi_exporter [CollectorsFlag] [ListenFlag] [MetricsPathFlag]" />
        <ServiceControl Id="ServiceStateControl" Name="wmi_exporter" Remove="uninstall" Start="install" Stop="both" />
      </Component>
    </ComponentGroup>

    <Feature Id="DefaultFeature" Level="1">
      <ComponentGroupRef Id="Files" />
    </Feature>
  </Product>
</Wix><commit_msg>Add DisplayName and Description to Windows service (#100)<commit_after><?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:fw="http://schemas.microsoft.com/wix/FirewallExtension">
  <?if $(sys.BUILDARCH)=x64 ?>
    <?define PlatformProgramFiles = "ProgramFiles64Folder" ?>
  <?else ?>
    <?define PlatformProgramFiles = "ProgramFilesFolder" ?>
  <?endif ?>

  <Product Id="*" UpgradeCode="66a6eb5b-1fc2-4b14-a362-5ceec6413308" 
           Name="WMI Exporter" Version="$(var.Version)" Manufacturer="<NAME>" 
           Language="1033" Codepage="1252">
    <Package Id="*" Manufacturer="<NAME>" InstallScope="perMachine" 
             Description="WMI Exporter $(var.Version) installer" Compressed="yes" />
    <Media Id="1" Cabinet="wmi_exporter.cab" EmbedCab="yes"/>
    <MajorUpgrade Schedule="afterInstallExecute" DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit." />

    <Property Id="ENABLED_COLLECTORS" Secure="yes"/>
    <SetProperty Id="CollectorsFlag" After="InstallFiles" Sequence="execute" Value="-collectors.enabled [ENABLED_COLLECTORS]">ENABLED_COLLECTORS</SetProperty>

    <Property Id="LISTEN_ADDR" Secure="yes" />
    <Property Id="LISTEN_PORT" Secure="yes" Value="9182" />
    <SetProperty Id="ListenFlag" After="InstallFiles" Sequence="execute" Value="-telemetry.addr [LISTEN_ADDR]:[LISTEN_PORT]">LISTEN_ADDR OR LISTEN_PORT</SetProperty>

    <Property Id="METRICS_PATH" Secure="yes"/>
    <SetProperty Id="MetricsPathFlag" After="InstallFiles" Sequence="execute" Value="-telemetry.path [METRICS_PATH]">METRICS_PATH</SetProperty>

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="$(var.PlatformProgramFiles)">
        <Directory Id="APPLICATIONROOTDIRECTORY" Name="wmi_exporter" />
      </Directory>
    </Directory>

    <ComponentGroup Id="Files" Directory="APPLICATIONROOTDIRECTORY">
      <Component>
        <File Id="wmi_exporter.exe" Name="wmi_exporter.exe" Source="Work\wmi_exporter.exe" KeyPath="yes">
          <fw:FirewallException Id="MetricsEndpoint" Name="WMI Exporter (HTTP [LISTEN_PORT])" Description="WMI Exporter HTTP endpoint" Port="[LISTEN_PORT]" Protocol="tcp" Scope="any" IgnoreFailure="yes" />
        </File>
        <ServiceInstall Id="InstallExporterService" Name="wmi_exporter" DisplayName="WMI exporter" Description="Exports Prometheus metrics from WMI queries" ErrorControl="normal" Start="auto" Type="ownProcess" Arguments="-log.format logger:eventlog?name=wmi_exporter [CollectorsFlag] [ListenFlag] [MetricsPathFlag]" />
        <ServiceControl Id="ServiceStateControl" Name="wmi_exporter" Remove="uninstall" Start="install" Stop="both" />
      </Component>
    </ComponentGroup>

    <Feature Id="DefaultFeature" Level="1">
      <ComponentGroupRef Id="Files" />
    </Feature>
  </Product>
</Wix>
{'fraction_non_alphanumeric': 0.1558325912733749, 'fraction_numerical': 0.016562778272484417, 'mean_word_length': 5.352941176470588, 'pattern_counts': {'":': 0, '<': 87, '<?xml version=': 2, '>': 87, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1522138', 'n_tokens_mistral': 1806, 'n_tokens_neox': 1704, 'n_words': 306}