Статья размещена автором Бетке Сергей Сергеевич

MSI пакет для 1С-Предприятия 7.7: WiX нам в помощь

Решил переписать свой старинный пост и выложить исходники. Рассмотрим типовую задачу. Имеем группу компаний с централизованным управлением. для it-специалистов – это масса “баз” 1С и необходимость управлять этим.

Создадим msi пакет для 1С предприятия (самой платформы 1c enterprise, производитель для неё msi не предлагает) и найдём удобный способ публикации ярлыков на конкретные приложения 1С (“базы”). Даже дам скачать MSI пакет для 1С Предприятия 7.7: WiX нам в помощь msi пакет для ленивых.

Постановка задачи

Имеем около сотни рабочих станций, с которых пользователи работают с приложениями 1С Предприятие 7.7. Терминальные решения на этом этапе не используются. Необходимо обеспечить распространение исполняемых файлов платформы 1С Предприятие 7.7, управление обновлениями при необходимости, восстановление в случае удаления или повреждения отдельных файлов.

Решение

Использовать будем платформу windows installer, для распространения приложения можем использовать GPO или иные средства, благо msi даёт нам широкий выбор средств развёртывания.

Для разработки используем MS Visual Studio Shell и WiX.

Заранее прошу — если будете качать и пользоваться, оставьте по результатам комментарии. Если потребуется что-либо добавить — сообщайте, добавим.

Начну сразу с конца, чтобы интереснее читать было. Идём ко мне на ftp: ftp://ftp.novgaro.ru/AMF/DSL/1%D1/Enterprise/. Видим там кучу папок. Заходим в крайний релиз на момент написания статьи: ftp://ftp.novgaro.ru/AMF/DSL/1%D1/Enterprise/7.70.000.0027.6/. Видим папки Prg и Prj. Папку Prj Вы можете честно качать себе целиком, и открывать в Visual Studio файл проекта (.wixproj).

Естественно, предварительно необходимо установить установить MS Visual Studio Shell и WiX уже к студии. Замечу, что нам подойдёт только сама среда (shell) студии – нам ведь нет необходимости использовать какие-либо компиляторы, нам нужен только бесплатный WiX. Качаем shell студии MS Visual Studio Shell и WiX (ссылка для закачки) к нему. Теперь мы можем открыть проект.

Качать имеет смысл только проекты из папок 7.70…

В папке Prg\adm можно найти уже подготовленную административную точку развёртывания msi пакета, скомпилированного WiX. Копируете папку целиком, и разворачиваете пакет на рабочие станции через GPO – и будем Вам счастье :-).

Интеграция с проводником

Честно говоря, долго думал над тем, каким образом обеспечить интеграцию с проводником. Поясню суть проблемы. Естественно, создавал msi пакет не для того, чтобы тупо файлики по сети раскинуть. Пакет по умолчанию будет устанавливать все компоненты в варианте “устанавливать при первом запуске”, то есть сразу после установки будет занимать минимум места и само развёртывание по сети займёт минимум времени. Кроме того, благодаря использованию режима публикации компонентов, пакет обеспечиваем восстановление и регистрацию компонентов в реестре пользователя и машины при первом использовании. То бишь запускает пользователь через ярлычёк базу, устанавливается платформа (если это первый запуск), видим интерфейс. Необходимые компоненты (нампример — 1С++) доставятся в момент их первого использования! А если в реестре чего не окажется – восстановят!

Но для такого счастья необходимо, чтобы ярлыки, по которым пользователь будет “открывать” базу, были advertised ярлыками компонента пакета. Естественно, одним пакетом регистрировать все свои базы глупость. Ищем другой вариант.

MSI пакет для 1С Предприятия 7.7: WiX нам в помощь Решил сделать так: пакет 1с (msi пакет имею в виду) регистрирует новый тип файла (точнее – просто регистрирует .md файл) как advertised. Тогда ярлыки на “базы” будут просто ярлыками на их .md файлы, при этом по такому ярлыку будут доступны всег глаголы, которые я определю в своём пакете 1C.msi.

Приведу несколько картинок. Справа представлен внешний вид меню Пуск, в котором размещён ярлык на одну из “баз”. Пользователю без особых знаний доступен только один глагол, он же – глагол по умолчанию “Запустить 1С-Предприятие”.

MSI пакет для 1С Предприятия 7.7: WiX нам в помощь Но одного глагола хватит для пользователей. Для разработчиков потребуются дополнительные. Согласитесь, плодить кучу ярлыков (типа – запуск в монопольном режиме, в отладчике и так далее) – жутко неудобно. Поэтому и обойдёмся одним ярлыком с разными глаголами. А чтобы их все увидеть – нажимаем и удерживаем Shift, и правой кнопкой на ярлыке (рисунок слева). Видим все необходимые глаголы с одним ярлыком :-).

Добиваемся необходимо результата следующим WiX кодом:

    <ComponentGroup Id="1Cv77main">

      <Component Id="MainExe" Guid="{0DEF748C-5890-41AC-9EAF-5450C60C9F28}" Location="either" Directory="DIR1CV77">
        <ProgId Id="$(var.AppProgID)" Description="Экземпляр приложения платформы 1С:Предприятие 7.7" Icon="icon1CApp.exe" Advertise="yes">
          <Extension Id="$(var.AppFileExt)" Advertise="yes">
            <Verb Id="open" Argument='/d"%1\.."'/>
            <Verb Id="open_enterprise" Command="Запустить 1С-&amp;Предприятие" Argument='enterprise /d"%1\.."'/>
            <Verb Id="open_enterprise_single_user_mode" Command="Запустить 1С-Предприятие &amp;монопольно" Argument='enterprise /m /d"%1\.."'/>
            <Verb Id="edit" Command="Открыть в конфигураторе" Argument='config /d"%1\.."'/>
            <Verb Id="edit_single_user_mode" Command="Открыть в &amp;конфигураторе монопольно" Argument='config /m /d"%1\.."'/>
            <Verb Id="debug" Command="Открыть в отладчике" Argument='debug /d"%1\.."'/>
            <Verb Id="debug_single_user_mode" Command="Открыть в от&amp;ладчике монопольно" Argument='debug /m /d"%1\.."'/>
            <Verb Id="monitor" Command="Открыть в &amp;Мониторе" Argument='monitor /d"%1\.."'/>
            <Verb Id="monitor_single_user_mode" Command="Открыть в Мониторе монопольно" Argument='monitor /m /d"%1\.."'/>
          </Extension>
        </ProgId>
      </Component>

      <Component Id="AppFilesTypes" Guid="{C9229C5B-53CD-4D4E-8B72-5F7A5278DBDF}" Location="either" Directory="DIR1CV77">
        <RegistryKey Root="HKMU" Key="Software\Classes">
          <RegistryKey Key="$(var.AppProgID)" Action="createAndRemoveOnUninstall">
            <!-- EditFlags:
          - FTA_Exclude (0x00000001)      Excludes the file class.
          - FTA_Show (0x00000002)         Shows file classes, such as folders, that are not associated with a file name extension.
          + FTA_HasExtension (0x00000004) Indicates that the file class has a file name extension.
          + FTA_NoEdit (0x00000008)       Prohibits editing of the registry entries associated with this file class, the addition of new entries, and the deletion or modification of existing entries.
          + FTA_NoRemove (0x00000010)     Prohibits deletion of the registry entries associated with this file class.
          + FTA_NoNewVerb (0x00000020)    Prohibits the addition of new verbs to the file class.
          + FTA_NoEditVerb (0x00000040)   Prohibits the modification or deletion of canonical verbs such as open and print.
          + FTA_NoRemoveVerb (0x00000080) Prohibits the deletion of canonical verbs such as open and print.
          + FTA_NoEditDesc (0x00000100)   Prohibits the modification or deletion of the description of the file class.
          + FTA_NoEditIcon (0x00000200)   Prohibits the modification or deletion of the icon assigned to the file class.
          + FTA_NoEditDflt (0x00000400)   Prohibits the modification of the default verb.
          + FTA_NoEditVerbCmd (0x00000800)Prohibits the modification of the commands associated with verbs.
          + FTA_NoEditVerbExe (0x00001000)Prohibits the modification or deletion of verbs.
          + FTA_NoDDE (0x00002000)        Prohibits the modification or deletion of the entries related to Dynamic Data Exchange (DDE).
          + FTA_NoEditMIME (0x00008000)   Prohibits the modification or deletion of the content type and default extension entries.
          - FTA_OpenIsSafe (0x00010000)   Indicates that the file class's open verb can be safely invoked for downloaded files.
          - FTA_AlwaysUnsafe (0x00020000) Prevents the Never ask me check box from being enabled. The user can override this attribute through the File Type dialog box.
          - FTA_AlwaysShowExt (0x00040000)Causes the file class's file name extension to be always shown, even if the user has selected the Hide extensions for known file types option.
          + FTA_NoRecentDocs (0x00100000) Prohibits the addition of members of this file class to the Recent Documents folder. Additionally, in Windows 7 and later, prohibits the addition of members of this file class to the automatic Recent or Frequent category of an application's Jump List.
          This flag does not restrict members of this file class from being added to a custom Jump List. It also places no restriction on the file type being added to the automatic Jump Lists of other applications in the case that other applications use this file type.
          0x0010BFFC
            последний флаг надо обязательно убрать, иначе в меню Пуск не будут проявляться наши приложения. а они там очень даже нужны.
            надо вообще подумать, как там зафиксировать хотя бы просто запуск 1С самой...
          -->
            <RegistryValue Type="string" Value="1С:Предприятие 7.7" KeyPath="yes"/>
            <RegistryValue Name="EditFlags" Type="integer" Value="1097724"/>
            <RegistryKey Key="shell">
              <RegistryValue Type="string" Value="open_enterprise,open_enterprise_single_user_mode,edit,edit_single_user_mode,debug,debug_single_user_mode,monitor,monitor_single_user_mode,open"/>
              <RegistryKey Key="open">
                <RegistryValue Name="MultiSelectModel" Type="string" Value="Single"/>
              </RegistryKey>
              <RegistryKey Key="open_enterprise">
                <RegistryValue Name="MultiSelectModel" Type="string" Value="Single"/>
              </RegistryKey>
              <RegistryKey Key="open_enterprise_single_user_mode">
                <RegistryValue Name="MultiSelectModel" Type="string" Value="Single"/>
                <RegistryValue Name="extended" Type="string" Value=""/>
              </RegistryKey>
              <RegistryKey Key="edit">
                <RegistryValue Name="MultiSelectModel" Type="string" Value="Single"/>
                <RegistryValue Name="extended" Type="string" Value=""/>
              </RegistryKey>
              <RegistryKey Key="edit_single_user_mode">
                <RegistryValue Name="MultiSelectModel" Type="string" Value="Single"/>
                <RegistryValue Name="extended" Type="string" Value=""/>
              </RegistryKey>
              <RegistryKey Key="debug">
                <RegistryValue Name="MultiSelectModel" Type="string" Value="Single"/>
                <RegistryValue Name="extended" Type="string" Value=""/>
              </RegistryKey>
              <RegistryKey Key="debug_single_user_mode">
                <RegistryValue Name="MultiSelectModel" Type="string" Value="Single"/>
                <RegistryValue Name="extended" Type="string" Value=""/>
              </RegistryKey>
              <RegistryKey Key="monitor">
                <RegistryValue Name="MultiSelectModel" Type="string" Value="Single"/>
                <RegistryValue Name="extended" Type="string" Value=""/>
              </RegistryKey>
              <RegistryKey Key="monitor_single_user_mode">
                <RegistryValue Name="MultiSelectModel" Type="string" Value="Single"/>
                <RegistryValue Name="extended" Type="string" Value=""/>
              </RegistryKey>
            </RegistryKey>
          </RegistryKey>
          <RegistryKey Key="Applications\1cv7s.exe">
            <RegistryValue Name="NoOpenWith" Type="string" Value=""/>
            <RegistryKey Key="SupportedTypes" Action="createAndRemoveOnUninstall">
              <RegistryValue Name=".$(var.AppFileExt)" Type="string" Value=""/>
            </RegistryKey>
          </RegistryKey>
        </RegistryKey>
      </Component>

Такой вот несложный код позволяет нам достигнуть результата.

Файл проекта

Сам файл проекта:

<?xml version="1.0" encoding="utf-8"?>
<?define productRoot = "[ITG]"?>
<?define productSection = "АСУП"?>
<?define productType = "Бухгалтерский учёт"?>
<?define shMain = "1C Предприятие 7.7"?>
<?define AppProgID = "1C.App.Instance.7.7"?>
<?define AppFileExt = "md"?>
<!--
  ресурсы:

http://openconf.1cpp.ru/beta/


http://www.script-coding.info/OpenConf.html

  конфигуратор с дополнениями:

http://1c.proclub.ru/modules/mydownloads/personal.php?lid=5095&cid=1001

  ссылки на внешние компоненты:

http://wiki.ukravto.in.ua/tisasp/index.php/%D0%92%D0%BD%D0%B5%D1%88%D0%BD%D0%B8%D0%B5_%D0%BA%D0%BE%D0%BC%D0%BF%D0%BE%D0%BD%D0%B5%D0%BD%D1%82%D1%8B


http://www.1csql.ru/materials/files/toyadmin

-->
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <!--Id="E3AA0E21-8FF7-4F98-B6C1-A78F9ED57BEC"-->
  <Product
    Id="{0F7E99FB-EFF7-4E78-AA03-F21A4CA35A39}"
      Name="[ГАРО-ITG] 1С Предприятие 7.07.000.0027"
    Language="1049" Codepage="1251"
      Manufacturer="1C"
      Version="7.70.027.7"
      UpgradeCode="0C725614-1E74-425E-A338-6D9AB9BB4ED9"
  >
    <Package
      Id="*"
      Keywords="Installer,MSI,1С"
      InstallerVersion="200"
      Platform="x86"
      Languages="1049" SummaryCodepage="1251"
      Compressed="no"
      AdminImage="yes"
      InstallScope="perMachine"
      InstallPrivileges="elevated"
      ShortNames="no"
        Description="1С Предприятие 7.7"
        Manufacturer="1C"
    />

    <Upgrade Id="8B0782F2-45C5-4AD4-99D9-11DB9FB425F0">
      <UpgradeVersion
        Minimum="1.0.0"
        Maximum="7.70.005.0025.4"
        IncludeMinimum="yes"
        IncludeMaximum="yes"
        Property="OLDPRODUCT_7_7_25_0"
        RemoveFeatures="ALL"
          />
    </Upgrade>
    <Upgrade Id="0C725614-1E74-425E-A338-6D9AB9BB4ED9">
      <UpgradeVersion
        Minimum="7.70"
        Maximum="7.70.026"
        IncludeMinimum="yes"
        IncludeMaximum="no"
        Property="OLDPRODUCT_7_7_25_6"
        RemoveFeatures="ALL"
          />
      <UpgradeVersion
        Minimum="7.70.027.1"
        IncludeMinimum="yes"
        Property="OLDPRODUCT_7_7_27"
        MigrateFeatures="yes"
      />
    </Upgrade>

    <Media Id="1" EmbedCab="no" />

    <Property Id="INSTALLLEVEL" Value="100" />
    <Property Id="ARPHELPTELEPHONE" Value="269, 338, 325"/>
    <Property Id="ARPCOMMENTS"><![CDATA[Исполняемые файлы 1С Предприятия, используемые в корпоративной сети Компании ГАРО.]]></Property>
    <Property Id="ARPURLINFOABOUT" Value="http://www.1c.ru"/>
    <Property Id="ARPPRODUCTICON" Value="1CAppIcon.exe" />
    <Property Id="COMPANYNAME" Value="Группа Компаний ГАРО"/>

    <Icon Id="icon1CApp.exe" SourceFile="SourceDir\Icon\1CAppIcon.exe" />

    <Condition
      Message="Установить систему [ProductName] можно только в операционных системах Windows 2000 / XP или старше."
    >
      <![CDATA[VersionNT>=500]]>
    </Condition>

    <CustomAction Id="SetWorkDir" Directory="WORKDIR" Value="[$MainExe]"/>

    <Directory Id="TARGETDIR" Name="SourceDir" FileSource="SourceDir">
      <Directory Id="StartMenuFolder">
        <Directory Id="ITGMenuFolder" Name="$(var.productRoot)">
          <Directory Id="ASUPMenuFolder" Name="$(var.productSection)">
            <Directory Id="ProductTypeMenuFolder" Name="$(var.productType)">
              <Directory Id="ProductFolder"/>
            </Directory>
          </Directory>
        </Directory>
      </Directory>
      <Directory Id="DesktopFolder"/>
      <Directory Id="ProgramFilesFolder" Name="ProgramFiles">
        <Directory Id="dir1CPrg" Name="1C">
          <Directory Id="DIR1CV60" Name="06"/>
          <Directory Id="DIR1CV77" Name="07.07">
            <Directory Id="WORKDIR"/>
          </Directory>
        </Directory>
      </Directory>
      <Directory Id="WindowsFolder" Name="Windows">
        <Directory Id="FontsFolder" Name="Fonts"/>
        <Directory Id="SystemFolder" Name="System32"/>
      </Directory>
    </Directory>

    <!-- базовые файлы платформы 1С 6.0 -->
    <ComponentGroup Id="1Cv60main">
      <Component Id="C1Cv60Bin" Guid="6FBBAEF7-179D-45EF-9CDB-B542FA92A6C0" Location="either" Directory="DIR1CV60">
        <File Source="SourceDir\ProgramFiles\1C\06\1sbw.exe" KeyPath="yes" Vital="no" BindPath="[DIR1CV60];[SystemFolder]"/>
        <File Source="SourceDir\ProgramFiles\1C\06\1sbwconv.exe" Vital="no"/>
        <File Source="SourceDir\ProgramFiles\1C\06\1sbwadm.exe" Vital="no"/>
        <File Source="SourceDir\ProgramFiles\1C\06\1SBW.AUT" Vital="no"/>
        <File Source="SourceDir\ProgramFiles\1C\06\1sbw.dd" Vital="no"/>
        <File Source="SourceDir\ProgramFiles\1C\06\1sbw.hlp" Vital="no"/>
        <File Source="SourceDir\ProgramFiles\1C\06\1sbwadm.hlp" Vital="no"/>
        <File Source="SourceDir\ProgramFiles\1C\06\1sbwlang.cnf" Vital="no"/>
        <File Source="SourceDir\ProgramFiles\1C\06\eng32.dll" Vital="no"/>
        <File Source="SourceDir\ProgramFiles\1C\06\vista32.dll" Vital="no"/>
        <File Source="SourceDir\ProgramFiles\1C\06\vistaut.dll" Vital="no"/>
      </Component>
    </ComponentGroup>

    <!-- базовые файлы платформы 1С 7.7 -->
    <ComponentGroup Id="1Cv77main">

      <Component Id="MainExe" Guid="{0DEF748C-5890-41AC-9EAF-5450C60C9F28}" Location="either" Directory="DIR1CV77">
        <ProgId Id="$(var.AppProgID)" Description="Экземпляр приложения платформы 1С:Предприятие 7.7" Icon="icon1CApp.exe" Advertise="yes">
          <Extension Id="$(var.AppFileExt)" Advertise="yes">
            <Verb Id="open" Argument='/d"%1\.."'/>
            <Verb Id="open_enterprise" Command="Запустить 1С-&amp;Предприятие" Argument='enterprise /d"%1\.."'/>
            <Verb Id="open_enterprise_single_user_mode" Command="Запустить 1С-Предприятие &amp;монопольно" Argument='enterprise /m /d"%1\.."'/>
            <Verb Id="edit" Command="Открыть в конфигураторе" Argument='config /d"%1\.."'/>
            <Verb Id="edit_single_user_mode" Command="Открыть в &amp;конфигураторе монопольно" Argument='config /m /d"%1\.."'/>
            <Verb Id="debug" Command="Открыть в отладчике" Argument='debug /d"%1\.."'/>
            <Verb Id="debug_single_user_mode" Command="Открыть в от&amp;ладчике монопольно" Argument='debug /m /d"%1\.."'/>
            <Verb Id="monitor" Command="Открыть в &amp;Мониторе" Argument='monitor /d"%1\.."'/>
            <Verb Id="monitor_single_user_mode" Command="Открыть в Мониторе монопольно" Argument='monitor /m /d"%1\.."'/>
          </Extension>
        </ProgId>

        <!-- главный инсполняемый файл -->
        <File Id="MainExe" Source="SourceDir\ProgramFiles\1C\07.07\1cv7s.exe" KeyPath="yes" Vital="yes">
          <Shortcut Id="MAINSHORTCUT" Directory="ProductFolder" Name="$(var.shMain)" WorkingDirectory="WORKDIR" Show="normal" Icon="icon1CApp.exe" IconIndex="0" Advertise="yes" />
          <!--<Shortcut Id="DESKTOPSHORTCUT" Directory="DesktopFolder" Name="$(var.shMain)" WorkingDirectory="WORKDIR" Show="normal" Icon="icon1CApp.exe" Advertise="yes"/>-->
          <Shortcut Id="MONITORSHORTCUT" Arguments="monitor" Directory="ProductFolder" Name="Монитор" WorkingDirectory="WORKDIR" Show="normal" Icon="icon1CApp.exe" IconIndex="3" Advertise="yes" />
          <Shortcut Id="MONITOR_SUM_SHORTCUT" Arguments="monitor /m" Directory="ProductFolder" Name="Монитор (монопольно)" WorkingDirectory="WORKDIR" Show="normal" Icon="icon1CApp.exe" IconIndex="3" Advertise="yes" />
          <Shortcut Id="DEBUGGERSHORTCUT" Arguments="debug" Directory="ProductFolder" Name="Отладчик" WorkingDirectory="WORKDIR" Show="normal" Icon="icon1CApp.exe" IconIndex="2" Advertise="yes" />
          <Shortcut Id="DEBUGGER_SUM_SHORTCUT" Arguments="debug /m" Directory="ProductFolder" Name="Отладчик (монопольно)" WorkingDirectory="WORKDIR" Show="normal" Icon="icon1CApp.exe" IconIndex="2" Advertise="yes" />
          <Shortcut Id="CONFIGSHORTCUT" Arguments="config" Directory="ProductFolder" Name="Конфигуратор" WorkingDirectory="WORKDIR" Show="normal" Icon="icon1CApp.exe" IconIndex="1" Advertise="yes" />
          <Shortcut Id="CONFIG_SUM_SHORTCUT" Arguments="config /m" Directory="ProductFolder" Name="Конфигуратор (монопольно)" WorkingDirectory="WORKDIR" Show="normal" Icon="icon1CApp.exe" IconIndex="1" Advertise="yes" />
        </File>

        <RegistryKey Root="HKLM" Key="SOFTWARE\1C\1Cv7" Action="createAndRemoveOnUninstall">
          <RegistryValue Name="RegOrg" Type="string" Value="[COMPANYNAME]"/>
          <!--<RegistryValue Name="RegUser" />-->
          <RegistryKey Key="7.7\1С:Предприятие для SQL" Action="createAndRemoveOnUninstall">
            <!--<RegistryValue Name="1CFolder" Type="string" Value="1C Предприятие 7.7" />-->
            <RegistryValue Name="1CPath" Type="string" Value="[#MainExe]" />
            <RegistryValue Name="RegMethod" Type="integer" Value="1" />
          </RegistryKey>
          <!--<Registry Id="WIREG00001708" Root="HKLM" Key="SOFTWARE\1C\1Cv7\7.7\Components" Type="string" Value="1" />-->
        </RegistryKey>

        <RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\1cv7s.exe" Action="createAndRemoveOnUninstall">
          <RegistryValue Type="string" Value="[#MainExe]" />
          <RegistryValue Name="Path" Type="string" Value="[$MainExe]" />
        </RegistryKey>
        <RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\1c.exe" Action="createAndRemoveOnUninstall">
          <RegistryValue Type="string" Value="[#MainExe]" />
          <RegistryValue Name="Path" Type="string" Value="[$MainExe]" />
        </RegistryKey>
        <RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\1cv7.exe" Action="createAndRemoveOnUninstall">
          <RegistryValue Type="string" Value="[#MainExe]" />
          <RegistryValue Name="Path" Type="string" Value="[$MainExe]" />
        </RegistryKey>

        <RemoveFolder Id="ITGMenuFolder" Directory="ITGMenuFolder" On="uninstall"/>
        <RemoveFolder Id="ASUPMenuFolder" Directory="ASUPMenuFolder" On="uninstall"/>
        <RemoveFolder Id="ProductTypeMenuFolder" Directory="ProductTypeMenuFolder" On="uninstall"/>
        <RemoveFolder Id="ProductFolder" Directory="ProductFolder" On="uninstall"/>
      </Component>

      <Component Id="AppFilesTypes" Guid="{C9229C5B-53CD-4D4E-8B72-5F7A5278DBDF}" Location="either" Directory="DIR1CV77">
        <!-- описание типа файла, который будет являться "ярлыком" конкретной базы 1С -->
        <!--
          + подробно про регистрацию типов файлов:
          + http://msdn.microsoft.com/en-us/library/cc144148(VS.85).aspx

          %0 или %1 замещаются именем открываемого файла.
          %* замещается всеми параметрами
          %~n замещаются всеми остальными параметрами, начиная с n-го параметра, где n — любое число от 2 до 9.
          %2 замещается первым параметром, %3 — вторым и т. д. 

          С пакетными параметрами можно также использовать модификаторы.
          Модификаторы используют информацию о текущем диске и каталоге
          как часть или полное имя файла или каталога.
          Для использования модификатора напечатайте символ (%), затем символ тильды (~),
          а затем соответствующий модификатор (т.е., %~модификатор).

          В следующей таблице описаны модификторы, используемые для расширения.

          Модификатор Описание
          %~1 расширение %1 и удаление любых кавычек ("")
          %~f1 замена %1 полным путем
          %~d1 замена %1 именем диска
          %~p1 замена %1 путем
          %~n1 замена %1 именем файла
          %~x1 замена %1 расширением имени файла
          %~s1 замена путем, содержащим только короткие имена
          %~a1 Замена %1 атрибутами файла
          %~t1 замена %1 датой и временем модификации файла
          %~z1 замена %1 размером файла
          %~$PATH:1 поиск в каталогах, перечисленных в переменной среды PATH, замена %1 полным именем первого найденного файла. Если переменная среды не определена или поиск не обнаружил файлов, модификатор выдает пустую строку. 

          В следующей таблице даны возможные комбинации модификаторов и квалификаторов для получения более сложных результатов.

          Модификатор Описание
          %~dp1 замена %1 именем диска и путем
          %~nx1 замена %1 именем файла и расширением
          %~dp$PATH:1 поиск в каталогах, перечисленных в переменной среды PATH, и замена %1 именем диска и путем к первому найденному файлу.
          %~ftza1 замена %1 строкой, аналогичной результату работы программы dir 

          Примечание

          %1 и PATH в показанных выше примерах можно заменить на другие значения пакетных параметров.
          Модификатор %* является уникальным, так как он представляет все аргументы,
          переданные пакетному файлу. Этот модификатор не используется в комбинации
          с модификатором %~. Конструкция %~ должна завершаться допустимым номером
          аргумента.

          итак, командную строку нам придётся строить следующим образом:
          "C:\Program Files\1Cv77\BIN\1Cv7s.exe" enterprise /d"%1\.."
          и дальше - по аналогии.
          запуск - в виде:
          myapp.md enterprise /m

          + http://msdn.microsoft.com/en-us/library/cc144101(VS.85).aspx
          +extended!!! - меню только с shift. имеет смысл всё, кроме Предприятия, вынесли в extended verb.

          про desktop.ini http://msdn.microsoft.com/en-us/library/cc144102(VS.85).aspx

          +надо сделать:
          +    HKEY_CLASSES_ROOT
          +         Applications
          +              MyProgram.exe
          +                   NoOpenWith
          +                   SupportedTypes
          +                        .ext1

          про progid в реестре

http://msdn.microsoft.com/en-us/library/cc144152(VS.85).aspx


http://msdn.microsoft.com/en-us/library/cc144171(VS.85).aspx

          +порядок глаголов в меню:
          + HKEY_CLASSES_ROOT
             DesktopBackground
                  Shell = "Personalization,Gadgets"
                  Display

          +для глаголов:
          +MultiSelectModel = Single или Document или Player. в нашем случае - Single.
          +http://msdn.microsoft.com/en-us/library/cc144171(VS.85).aspx

          настройка вида папок через desktop.ini.
          предлагаю использовать для папок баз

http://msdn.microsoft.com/en-us/library/bb776832(VS.85).aspx

        -->
        <RegistryKey Root="HKMU" Key="Software\Classes">
          <RegistryKey Key="$(var.AppProgID)" Action="createAndRemoveOnUninstall">
            <!-- EditFlags:
          - FTA_Exclude (0x00000001)      Excludes the file class.
          - FTA_Show (0x00000002)         Shows file classes, such as folders, that are not associated with a file name extension.
          + FTA_HasExtension (0x00000004) Indicates that the file class has a file name extension.
          + FTA_NoEdit (0x00000008)       Prohibits editing of the registry entries associated with this file class, the addition of new entries, and the deletion or modification of existing entries.
          + FTA_NoRemove (0x00000010)     Prohibits deletion of the registry entries associated with this file class.
          + FTA_NoNewVerb (0x00000020)    Prohibits the addition of new verbs to the file class.
          + FTA_NoEditVerb (0x00000040)   Prohibits the modification or deletion of canonical verbs such as open and print.
          + FTA_NoRemoveVerb (0x00000080) Prohibits the deletion of canonical verbs such as open and print.
          + FTA_NoEditDesc (0x00000100)   Prohibits the modification or deletion of the description of the file class.
          + FTA_NoEditIcon (0x00000200)   Prohibits the modification or deletion of the icon assigned to the file class.
          + FTA_NoEditDflt (0x00000400)   Prohibits the modification of the default verb.
          + FTA_NoEditVerbCmd (0x00000800)Prohibits the modification of the commands associated with verbs.
          + FTA_NoEditVerbExe (0x00001000)Prohibits the modification or deletion of verbs.
          + FTA_NoDDE (0x00002000)        Prohibits the modification or deletion of the entries related to Dynamic Data Exchange (DDE).
          + FTA_NoEditMIME (0x00008000)   Prohibits the modification or deletion of the content type and default extension entries.
          - FTA_OpenIsSafe (0x00010000)   Indicates that the file class's open verb can be safely invoked for downloaded files.
          - FTA_AlwaysUnsafe (0x00020000) Prevents the Never ask me check box from being enabled. The user can override this attribute through the File Type dialog box.
          - FTA_AlwaysShowExt (0x00040000)Causes the file class's file name extension to be always shown, even if the user has selected the Hide extensions for known file types option.
          + FTA_NoRecentDocs (0x00100000) Prohibits the addition of members of this file class to the Recent Documents folder. Additionally, in Windows 7 and later, prohibits the addition of members of this file class to the automatic Recent or Frequent category of an application's Jump List.
          This flag does not restrict members of this file class from being added to a custom Jump List. It also places no restriction on the file type being added to the automatic Jump Lists of other applications in the case that other applications use this file type.
          0x0010BFFC
            последний флаг надо обязательно убрать, иначе в меню Пуск не будут проявляться наши приложения. а они там очень даже нужны.
            надо вообще подумать, как там зафиксировать хотя бы просто запуск 1С самой...
          -->
            <RegistryValue Type="string" Value="1С:Предприятие 7.7" KeyPath="yes"/>
            <RegistryValue Name="EditFlags" Type="integer" Value="1097724"/>
            <RegistryKey Key="shell">
              <RegistryValue Type="string" Value="open_enterprise,open_enterprise_single_user_mode,edit,edit_single_user_mode,debug,debug_single_user_mode,monitor,monitor_single_user_mode,open"/>
              <RegistryKey Key="open">
                <RegistryValue Name="MultiSelectModel" Type="string" Value="Single"/>
              </RegistryKey>
              <RegistryKey Key="open_enterprise">
                <RegistryValue Name="MultiSelectModel" Type="string" Value="Single"/>
              </RegistryKey>
              <RegistryKey Key="open_enterprise_single_user_mode">
                <RegistryValue Name="MultiSelectModel" Type="string" Value="Single"/>
                <RegistryValue Name="extended" Type="string" Value=""/>
              </RegistryKey>
              <RegistryKey Key="edit">
                <RegistryValue Name="MultiSelectModel" Type="string" Value="Single"/>
                <RegistryValue Name="extended" Type="string" Value=""/>
              </RegistryKey>
              <RegistryKey Key="edit_single_user_mode">
                <RegistryValue Name="MultiSelectModel" Type="string" Value="Single"/>
                <RegistryValue Name="extended" Type="string" Value=""/>
              </RegistryKey>
              <RegistryKey Key="debug">
                <RegistryValue Name="MultiSelectModel" Type="string" Value="Single"/>
                <RegistryValue Name="extended" Type="string" Value=""/>
              </RegistryKey>
              <RegistryKey Key="debug_single_user_mode">
                <RegistryValue Name="MultiSelectModel" Type="string" Value="Single"/>
                <RegistryValue Name="extended" Type="string" Value=""/>
              </RegistryKey>
              <RegistryKey Key="monitor">
                <RegistryValue Name="MultiSelectModel" Type="string" Value="Single"/>
                <RegistryValue Name="extended" Type="string" Value=""/>
              </RegistryKey>
              <RegistryKey Key="monitor_single_user_mode">
                <RegistryValue Name="MultiSelectModel" Type="string" Value="Single"/>
                <RegistryValue Name="extended" Type="string" Value=""/>
              </RegistryKey>
            </RegistryKey>
          </RegistryKey>
          <RegistryKey Key="Applications\1cv7s.exe">
            <RegistryValue Name="NoOpenWith" Type="string" Value=""/>
            <RegistryKey Key="SupportedTypes" Action="createAndRemoveOnUninstall">
              <RegistryValue Name=".$(var.AppFileExt)" Type="string" Value=""/>
            </RegistryKey>
          </RegistryKey>
        </RegistryKey>
      </Component>

      <Component Id="SQLConnectionParams" Guid="{0FB23F8A-4D3E-4CEC-9DDA-DE9CCF6F7324}" Directory="SystemFolder">
        <RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo" Action="none">
          <!--<Registry Id="sqlAlias1" Root="HKLM" Key="SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo" Type="string" Name="SERVER-5\BUCH" Value="DBMSSOCN,SERVER-5\BUCH,1433"/>
              <Registry Id="sqlAlias2" Root="HKLM" Key="SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo" Type="string" Name="SERVER-5.NOVGARO.RU\BUCH" Value="DBMSSOCN,SERVER-5.NOVGARO.RU\BUCH,1433"/>-->
          <RegistryValue Id="sqlAlias" Type="string" Name="1C-DBS.SQL.SERVICES.NOVGARO.RU\BUCH" Value="DBMSSOCN,1C-DBS.SQL.SERVICES.NOVGARO.RU\BUCH,1433" KeyPath="yes"/>
        </RegistryKey>
      </Component>

      <Component Id="System1CBasic" Guid="{4572AE00-C14A-41B8-A5F2-6067E04FF074}" Location="either" Directory="DIR1CV77">
        <!--базовая компонента платформы-->
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\Basic.dll" Vital="yes"/>
      </Component>
      <Component Id="System1CAccount" Guid="{13F25CFB-C49C-4C91-ABCE-417CA2D1B9BD}" Location="either" Directory="DIR1CV77">
        <!--компонента бухгалтерского учёта-->
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\Account.dll" Vital="yes"/>
      </Component>
      <Component Id="System1CTrade" Guid="{9CCF4310-EAE1-48BB-B233-7691509BA6AB}" Location="either" Directory="DIR1CV77">
        <!--компонента оперативного учёта - регистры-->
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\Trade.dll" Vital="yes"/>
      </Component>
      <Component Id="System1CSalary" Guid="{7847D934-04D0-447B-BC9C-6FC7726B4E38}" Location="either" Directory="DIR1CV77">
        <!--компонента расчёта-->
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\Salary.dll" Vital="yes"/>
      </Component>

      <Component Id="TxtEdt.dll" Guid="{7BA3069B-0127-4F5A-B8A8-E894E7C06FAB}" Location="either" Directory="DIR1CV77">
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\TxtEdt.dll" Vital="yes"/>
      </Component>
      <Component Id="Seven.dll" Guid="{BF38B4CF-396A-4565-8B02-1064F4AD9A8D}"  Location="either" Directory="DIR1CV77">
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\Seven.dll" Vital="yes"/>
      </Component>
      <Component Id="Tracer.dll" Guid="{3DD29551-D87E-456A-A514-7791D1DDB9A7}"  Location="either" Directory="DIR1CV77">
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\Tracer.dll" Vital="yes"/>
      </Component>
      <Component Id="Monitor.dll" Guid="{80EFD1FB-D894-495B-A70B-37C03EB20969}" Location="either" Directory="DIR1CV77">
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\Monitor.dll" Vital="yes"/>
      </Component>
      <Component Id="Config.dll" Guid="{A0F381A6-287C-4C4C-93CF-AA77160D45E4}" Location="either" Directory="DIR1CV77">
        <!--конфигуратор-->
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\Config.dll" Vital="yes"/>
      </Component>
      <Component Id="Editr.dll" Guid="{490171EA-EEE7-4608-A637-44858F46576D}"  Location="either" Directory="DIR1CV77">
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\Editr.dll" Vital="yes"/>
      </Component>
      <Component Id="UserDef.dll" Guid="{52D2E6D0-0091-4B4F-9286-056B6E0A1445}" Location="either" Directory="DIR1CV77">
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\UserDef.dll" Vital="yes"/>
      </Component>
      <Component Id="BLang.dll" Guid="{51857EF9-F49A-4816-852C-514FCB09DC3B}" Location="either" Directory="DIR1CV77">
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\BLang.dll" Vital="yes"/>
      </Component>
      <Component Id="BkEnd.dll" Guid="{517EA434-2D53-49D9-A346-7ED55FC43ED1}" Location="either" Directory="DIR1CV77">
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\BkEnd.dll" Vital="yes"/>
      </Component>
      <Component Id="br32.dll" Guid="{6C51D694-7872-4789-847B-1BCC7890982C}" Location="either" Directory="DIR1CV77">
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\br32.dll" Vital="yes"/>
      </Component>
      <Component Id="RGProc.dll" Guid="{18B8593A-2CFC-4EC3-968E-9FA1E6BF17A9}" Location="either" Directory="DIR1CV77">
        <!--язык запросов-->
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\RGProc.dll" Vital="yes"/>
      </Component>
      <Component Id="type32.dll" Guid="{703CC36B-69A7-4E68-92B6-916C27117DB3}" Location="either" Directory="DIR1CV77">
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\type32.dll" Vital="yes"/>
      </Component>
      <Component Id="zlibeng.dll" Guid="{59B791DB-3D17-4044-A9B6-665B42853D75}" Location="either" Directory="DIR1CV77">
        <Class Id="C5276425-F299-11D0-8149-004095E1F439" Context="InprocServer32" Description="zlibEngine Class" Advertise="yes">
          <ProgId Id="V75.zlibEngine" Description="zlibEngine Class" Advertise="yes"/>
        </Class>
        <Class Id="E196D997-FB8C-11D0-AE1D-D9180F4C4641" Context="InprocServer32" Description="jpegEngine Class" Advertise="yes">
          <ProgId Id="V75.jpegEngine" Description="jpegEngine Class" Advertise="yes"/>
        </Class>
        <Class Id="E196D999-FB8C-11D0-AE1D-D9180F4C4641" Context="InprocServer32" Description="tiffEngine Class" Advertise="yes">
          <ProgId Id="V75.tiffEngine" Description="tiffEngine Class" Advertise="yes"/>
        </Class>
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\zlibeng.dll" Vital="no">
          <TypeLib Id="C5276436-F299-11D0-8149-004095E1F439" Language="0" Description="zlEngine 1.0 Type Library" Advertise="yes"/>
        </File>
      </Component>
      <Component Id="IMAGECOL.BMP" Guid="{874400EA-3514-4F89-BE20-03AE87877F52}" Location="either" Directory="DIR1CV77">
        <!--коллекция иконок 1С-->
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\IMAGECOL.BMP" Vital="no"/>
      </Component>
      <Component Id="Slice.bmp" Guid="{A08FFA75-50A0-4384-B1CD-E3874AE555F7}" Location="either" Directory="DIR1CV77">
        <!--фон сплэш окна-->
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\Slice.bmp" Vital="no"/>
      </Component>
      <Component Id="_1crcrus.dll" Guid="{C4606FCE-5199-4C63-8C7B-599C4A99E13E}" Location="either" Directory="DIR1CV77">
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\1crcrus.dll" Vital="yes"/>
      </Component>
      <Component Id="frame.dll" Guid="{2E923691-3C35-4A66-9A47-9609E726E27F}" Location="either" Directory="DIR1CV77">
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\frame.dll" Vital="yes"/>
      </Component>
      <Component Id="Moxel.dll" Guid="{86E57BAA-FA7F-4A82-BB7A-48033429E750}" Location="either" Directory="DIR1CV77">
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\Moxel.dll" Vital="yes"/>
      </Component>

      <Component Id="main.cpl" Guid="{DD28C6CE-AAD4-4EDE-87C3-47001048FB8A}" Location="either" Directory="DIR1CV77">
        <!--палитра-->
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\main.cpl" Vital="no"/>
      </Component>
      <Component Id="main.PAL" Guid="{7B5C4B0A-3682-4FB6-9672-A2C2AA76130B}" Location="either" Directory="DIR1CV77">
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\main.PAL" Vital="no"/>
      </Component>

      <Component Id="_1CV7.SPL" Guid="{F2BFFE9D-D554-4549-A796-70ED03FBB357}" Location="either" Directory="DIR1CV77">
        <!--языковое описание рубля-->
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\1CV7.SPL" Vital="yes"/>
      </Component>
      <Component Id="UE.spl" Guid="{8A6589E9-76E6-414D-9AC3-42C2E2B9FD48}" Location="either" Directory="DIR1CV77">
        <!--языковое описание условной единицы-->
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\UE.spl" Vital="no"/>
      </Component>
      <Component Id="DEM.spl" Guid="{E413DBB3-0AFE-46BC-983D-6E0C3C317073}" Location="either" Directory="DIR1CV77">
        <!--языковое описание немецкой марки-->
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\DEM.spl" Vital="no"/>
      </Component>
      <Component Id="DM.spl" Guid="{27D442CC-7E37-432B-82A1-13D6D41D7B8A}" Location="either" Directory="DIR1CV77">
        <!--языковое описание немецкой марки-->
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\DM.spl" Vital="no"/>
      </Component>
      <Component Id="USD.spl" Guid="{F75F7667-EEA8-46AE-8FBD-05A38E3FC69F}" Location="either" Directory="DIR1CV77">
        <!--языковое описание доллара-->
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\USD.spl" Vital="no"/>
      </Component>
      <Component Id="EUR.spl" Guid="{508880EE-B0A5-4A6C-AA4F-18D8F4014386}" Location="either" Directory="DIR1CV77">
        <!--языковое описание евро-->
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\EUR.spl" Vital="no"/>
      </Component>

      <Component Id="NETHASP.INI" Guid="{4DC0BA74-604F-45C9-9559-6ED26BA8D2CB}" Location="either" Directory="DIR1CV77">
        <!--конфигурация защиты авторских прав (hasp)-->
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\NETHASP.INI" Vital="yes"/>
      </Component>

      <Component Id="main.ACT" Guid="{A34844CA-0CF6-46C2-B62B-0397E91188BB}" Location="either" Directory="DIR1CV77">
        <!--встроенная справка для разработчиков по языку платформы (оригинальная)-->
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\main.ACT" Vital="no"/>
      </Component>
      <Component Id="_1cv7Lang.als" Guid="{9485C5C6-60C6-4D1C-B519-716E1EAE696F}" Location="either" Directory="DIR1CV77">
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\1cv7Lang.als" Vital="no"/>
      </Component>
      <Component Id="_1cv7tOpr.als" Guid="{E888F139-A148-4123-B49F-3E0CE7C09ECA}" Location="either" Directory="DIR1CV77">
        <!--Справка по математическим операторам-->
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\1cv7tOpr.als" Vital="no"/>
      </Component>

      <Component Id="Template.mxl" Guid="{A0100390-F4A9-478F-B438-344FC23CBA0C}" Location="either" Directory="DIR1CV77">
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\Шаблон.mxl" Vital="no"/>
      </Component>
    </ComponentGroup>

    <!-- системные файлы -->
    <ComponentGroup Id="SystemComponents">
      <Component Id="MFCruntime" Guid="{CCA270DC-EFDA-43F0-97EE-501DAD88E4A1}" SharedDllRefCount="yes" Location="local" Directory="SystemFolder">
        <File Vital="yes" KeyPath="yes" Source="SourceDir\Windows\System32\mfcans32.dll"/>
        <File Vital="yes" Source="SourceDir\Windows\System32\mfcuia32.dll"/>
      </Component>
      <Component Id="Fonts" Guid="EA60DA25-8785-438C-8001-1C2FCD8C2757" Location="local" Permanent="yes" Directory="FontsFolder">
        <File Source="SourceDir\Windows\Fonts\EANG000.TTF" KeyPath="yes" TrueType="yes" Vital="no"/>
      </Component>
    </ComponentGroup>

    <!-- поддержка DBF баз -->
    <ComponentGroup Id="1Cv77DBEngineDBF">
      <Component Id="dbeng32.dll" Guid="{E07A2826-E9A2-47D0-9B33-D886DC156AD1}" Location="either" Directory="DIR1CV77">
        <!--компонента интерфейса с БД на основе dbf и cdx файлов-->
        <!--<File KeyPath="yes" Name="dbeng32.dll" Vital="yes"/>-->
        <File KeyPath="yes" Name="dbeng32.dll" Source="SourceDir\ProgramFiles\1C\07.07\[itg - with disk cache] dbeng32.dll" Vital="yes"/>
      </Component>
    </ComponentGroup>

    <!-- справка пользователя и советы дня -->
    <ComponentGroup Id="_1Cv77help">
      <Component Id="_1CV7.hlp" Guid="{C6DB1CBC-4F75-4384-9DD8-1C441E13A5D7}"  Location="either" Directory="DIR1CV77">
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\1CV7.hlp" Vital="no"/>
      </Component>
      <Component Id="_1cv7Main.tip" Guid="{2F071388-6022-42B4-9C42-6FD2ADC05B21}" Location="either" Directory="DIR1CV77">
        <!--совет дня-->
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\1cv7Main.tip" Vital="no"/>
      </Component>
      <Component Id="_1cv7Cnfg.tip" Guid="{CE81E346-D750-49A1-B29C-776714939FD9}" Location="either" Directory="DIR1CV77">
        <!--совет дня в конфигураторе-->
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\1cv7Cnfg.tip" Vital="no"/>
      </Component>
    </ComponentGroup>

    <!-- расширения: v7+ -->
    <ComponentGroup Id="_1Cv77plus">
      <Component Id="V7PLUS.DLL" Guid="{D7B2B450-E793-48CB-8E6E-9B319FFF2027}" Location="either" Directory="DIR1CV77">
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\V7PLUS.DLL" Vital="yes" SelfRegCost="1">
          <TypeLib Id="36996AB7-3153-11D4-8CD0-008048DA120F" Language="0" Description="v7plus 1.0 Type Library" Advertise="yes" MajorVersion="1" MinorVersion="0"/>
        </File>

        <Class Id="1E7BC440-1076-11D4-A635-004095E0EBD2" Context="InprocServer32" Description="V7HttpReader Class" Version="1" Advertise="yes">
          <ProgId Id="AddIn.V7HttpReader.1" Advertise="yes" Description="V7HttpReader Class">
            <ProgId Id="AddIn.V7HttpReader" Advertise="yes" Description="V7HttpReader Class"/>
          </ProgId>
        </Class>

        <Class Id="FAA6EBE0-1069-11D4-A5FF-008048DA0CD2" Context="InprocServer32" Description="V7Mail Class" Version="1" Advertise="yes">
          <ProgId Id="AddIn.V7Mail.1" Advertise="yes" Description="V7Mail Class">
            <ProgId Id="AddIn.V7Mail" Advertise="yes" Description="V7Mail Class"/>
          </ProgId>
        </Class>

        <Class Id="046D5520-2C8F-11D4-A62A-008048DA0CD2" Context="InprocServer32" Description="V7SysInfo Class" Version="1" Advertise="yes">
          <ProgId Id="AddIn.V7SysInfo.1" Advertise="yes" Description="V7SysInfo Class">
            <ProgId Id="AddIn.V7SysInfo" Advertise="yes" Description="V7SysInfo Class"/>
          </ProgId>
        </Class>

        <Class Id="921DA8DB-1E6F-4D61-8F49-A3127B799B19" Context="InprocServer32" Description="V7TextFile Class" Version="1" Advertise="yes">
          <ProgId Id="AddIn.V7TextFile.1" Advertise="yes" Description="V7TextFile Class">
            <ProgId Id="AddIn.V7TextFile" Advertise="yes" Description="V7TextFile Class"/>
          </ProgId>
        </Class>
      </Component>

      <Component Id="V7Plus.als" Guid="{79F76DC1-BE13-4021-A2BA-1ADA092FC7B0}" Location="either" Directory="DIR1CV77">
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\V7Plus.als" Vital="no"/>
      </Component>
    </ComponentGroup>

    <!-- расширения: диаграммы -->
    <ComponentGroup Id="1Cv77chart">
      <Component Id="v7chart.dll" Guid="{D0E6928C-B695-4F05-AAE9-AF552AD5D417}" Location="either" Directory="DIR1CV77">
        <!--компонента, реализующая возможность использования диаграмм в отчётах-->
        <Class Id="B9345637-29FB-11D1-BE02-00A024BE803F" Context="InprocServer32" Description="1C.V7.Предприятие" Version="1" Advertise="yes">
          <ProgId Id="V7chart.V7chart.1" Advertise="yes"/>
        </Class>
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\v7chart.dll" Vital="no" SelfRegCost="1">
          <TypeLib Id="B9345629-29FB-11D1-BE02-00A024BE803F" Language="0" Description="v7chart 1.0 Type Library" Advertise="yes"/>
        </File>
      </Component>
    </ComponentGroup>

    <!-- расширения: 1C Рарус CRM -->
    <ComponentGroup Id="1Cv77CRM">
      <Component Id="PS1C.dll" Guid="{E4E201CA-AB8F-45FE-8A03-3B99DEEA96DA}" Location="either" Directory="DIR1CV77">
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\PS1C.dll" Vital="yes" SelfRegCost="1"/>
        <Class Id="2A6D2DC8-CD72-428F-8499-21A834CF948A" Context="InprocServer32" Description="(c) 1C-Рарус 2002,2003" Advertise="yes">
          <ProgId Id="AddIn.PS1C" Description="(c) 1C-Рарус 2002,2003" Advertise="yes"/>
        </Class>
        <Class Id="EF11B719-3CE9-4EE6-AA3C-76623D83E4DB" Context="InprocServer32" Description="TPropPage property page" Advertise="yes"/>
      </Component>
      <Component Id="CRM.dll" Guid="{5EAFEA43-708D-45D1-9F3B-F731B393A15E}" Location="either" Directory="DIR1CV77">
        <Class Id="60A50480-81C7-11D5-B6BA-00A0CC5639CA" Context="InprocServer32" Description="Advanced Synchronizer" Advertise="yes">
          <ProgId Id="AddIn.A03" Description="Advanced Synchronizer" Advertise="yes"/>
        </Class>
        <Class Id="69958DDD-DE38-4578-9E44-5C5D9C7EA9A6" Context="InprocServer32" Description="(c) 1C-Рарус 2002,2003" Advertise="yes">
          <ProgId Id="AddIn.CRM" Description="(c) 1C-Рарус 2002,2003" Advertise="yes"/>
        </Class>
        <Class Id="95837B63-B479-4927-999F-CDA26C979B29" Context="InprocServer32" Description="TPropPage property page" Advertise="yes"/>
        <Class Id="FFF380CC-A1F2-4567-B3B9-F924C6973605" Context="InprocServer32" Advertise="yes">
          <ProgId Id="AddIn.mail" Advertise="yes"/>
        </Class>
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\CRM.dll" Vital="yes" SelfRegCost="1"/>
        <RegistryKey Root="HKLM" Key="SOFTWARE\1С-Рарус" Action="createAndRemoveOnUninstall"/>
        <File Source="SourceDir\ProgramFiles\1C\07.07\server.ini" />
      </Component>
      <Component Id="CRM.als" Guid="{44FA77EA-B4DA-442C-ABB0-79423C239D95}" Location="either" Directory="DIR1CV77">
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\CRM.als" Vital="no"/>
      </Component>
    </ComponentGroup>

    <!-- расширения: 1C++ -->
    <ComponentGroup Id="1Cv771CPP">
      <Component Id="_1CPP.dll" Guid="{EAB167FF-A555-4106-9315-6A8AEA1D6EE5}" Location="either" Directory="DIR1CV77" Feature="Enterprise77Addins_1cpp">
        <TypeLib Id="{3A5F0172-87E1-4AB6-BE86-39066F6E0AB9}" MajorVersion="1" MinorVersion="0" Language="0" HelpDirectory="WORKDIR" Description="1C++ 1.0" Advertise="yes">
          <Class Id="FDE5AE76-00B3-4BDB-921B-D5937997B1B7" Context="InprocServer32" Description="OXY" Advertise="yes" Insertable="no" Version="1">
            <ProgId Id="Addin.1C++.1" Description="OXY" Advertise="yes">
              <ProgId Id="Addin.1C++" Description="OXY" Advertise="yes"/>
            </ProgId>
          </Class>
        </TypeLib>
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\1CPP.dll" Vital="yes"/>
      </Component>
      <Component Id="_1CPP.als" Guid="{0CC4F41B-2BA0-4D07-93E7-507E5A26548B}" Location="either" Directory="DIR1CV77">
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\1CPP.als" Vital="no"/>
      </Component>
    </ComponentGroup>

    <!-- расширения: штрихкоды -->
    <ComponentGroup Id="BarCodeOCX">
      <Component Id="BARCODE.OCX" Guid="{B2F63BEF-F1F8-4D17-A37E-45D5526EB270}" Location="local" Directory="SystemFolder" SharedDllRefCount="yes">
        <Class Id="0BFA85A4-F9B8-11CF-8939-444553540000" Context="InprocServer32" Description="ActiveBarcode Property Page" Advertise="yes"/>
        <Class Id="24BC5653-DABA-11D1-81B1-4854E829F4A4" Context="InprocServer32" Description="ActiveBarcode Layout Property Page" Advertise="yes" />
        <Class Id="8A04E844-F5EF-11CF-8939-444553540000" Context="InprocServer32" Description="ActiveBarcode" Advertise="yes">
          <ProgId Id="BARCODE.BarcodeCtrl.1" Description="ActiveBarcode" Advertise="yes"/>
        </Class>
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\BARCODE.OCX" Vital="no" SelfRegCost="1">
          <TypeLib Id="0BFA85A1-F9B8-11CF-8939-444553540000" Language="0" Description="ActiveBarcode" Advertise="yes"/>
        </File>
      </Component>
      <Component Id="Vcl30.dpl" Guid="{F643DBD8-071A-4BF6-AB40-01A17DF6FCC7}" Location="local" Directory="SystemFolder" SharedDllRefCount="yes">
        <File KeyPath="yes" Source="SourceDir\Windows\System32\Vcl30.dpl" Vital="no"/>
      </Component>
    </ComponentGroup>

    <!--драйверы контрольно-кассовых машин-->
    <ComponentGroup Id="DPP">
      <Component Id="FPrnM1C.dll" Guid="{55DFA778-3739-4843-AE9A-39E4193022D3}" Location="either" Directory="DIR1CV77">
        <Class Id="8DBBD8D1-7B5E-11D3-9BBE-0000E8DC5000" Context="InprocServer32" Description="TpageOptions property page" Advertise="yes" />
        <Class Id="E4795281-3564-11D4-8E97-0080C87C930A" Context="InprocServer32" Description="ATOL: Common ECR Driver" Advertise="yes">
          <ProgId Id="AddIn.FprnM45" Description="ATOL: Common ECR Driver" Advertise="yes"/>
        </Class>
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\FPrnM1C.dll" Vital="no" SelfRegCost="1">
          <TypeLib Id="E4795282-3564-11D4-8E97-0080C87C930A" Language="0" Description="ATOL: Common ECR Driver" Advertise="yes"/>
        </File>
      </Component>
      <Component Id="Dpp1_X.dll" Guid="{C94C0B09-7E60-46A4-AC54-AEAA6B34CAE2}" Location="either" Directory="DIR1CV77">
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\Dpp1_X.dll" Vital="no"/>
      </Component>
      <Component Id="Dpp2_1.dll" Guid="{991CC2CE-D9AB-4CF7-98B5-BDD70E61CDA3}" Location="either" Directory="DIR1CV77">
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\Dpp2_1.dll" Vital="no"/>
      </Component>
      <Component Id="Dpp2_2.dll" Guid="{31136371-8B70-4D90-9084-E11D5A0E7463}" Location="either" Directory="DIR1CV77">
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\Dpp2_2.dll" Vital="no"/>
      </Component>
      <Component Id="Dpp2_3.dll" Guid="{9D3B621A-8BEF-42CC-8839-D401D2C6CD05}" Location="either" Directory="DIR1CV77">
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\Dpp2_3.dll" Vital="no"/>
      </Component>
      <Component Id="DISPOPOS.DLL" Guid="{F868990E-AEDD-4F37-AB99-AEB04F41DD65}" Location="either" Directory="DIR1CV77">
        <!--
          Драйвер дисплея покупателя (на ККМ и не только)
        -->
        <Class Id="4EDFF4E1-6354-11D1-A4D0-004095E1DAEA" Context="InprocServer32" Description="CustomerDisplay Class" Version="1" Advertise="yes">
          <ProgId Id="AddIn.CustomerDisplay.1" Description="CustomerDisplay Class" Advertise="yes"/>
        </Class>
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\DISPOPOS.DLL" Vital="no" SelfRegCost="1">
          <TypeLib Id="7D13CE41-64B5-11D1-A4D4-004095E1DAEA" Language="0" Description="V75 AddIn 1.0 Type Library" Advertise="yes"/>
        </File>
      </Component>
      <Component Id="FprnMLS.exe" Guid="{86036350-C692-4CF7-BC7C-965D9FA10EA5}" Location="either" Directory="DIR1CV77">
        <!--сервер ККМ-->
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\FprnMLS.exe" Vital="no"/>
      </Component>
    </ComponentGroup>

    <!--драйверы сканнеров штрих кодов-->
    <ComponentGroup Id="BarCodeScanners">
      <Component Id="SCANOPOS.DLL" Guid="{9DCA6162-44DD-4A7B-BF5C-AFFBAFBCF5DA}" Location="either" Directory="DIR1CV77">
        <Class Id="145344B1-3FC5-11D1-A470-004095E1DAEA" Context="InprocServer32" Description="Scanner Class" Version="1" Advertise="yes">
          <ProgId Id="AddIn.Scanner.1" Description="Scanner Class" Advertise="yes"/>
        </Class>
        <File KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\SCANOPOS.DLL" Vital="no">
          <TypeLib Id="4F0D4571-0E7B-11D1-A486-004095E1DAEA" Language="0" Description="V7 AddIn 1.0 Type Library" Advertise="yes"/>
        </File>
      </Component>
    </ComponentGroup>

    <!--поддержка mxl формата-->
    <ComponentGroup Id="1Cv77MXL">
      <Component Id="mxl2xl.dll" Guid="{E07B1FB8-694D-4485-A471-1C259DC23E8D}" Location="local" Directory="SystemFolder" SharedDllRefCount="yes" Feature="Enterprise77Addins_MXL">
        <File Id="mxl2xl.dll" KeyPath="yes" Source="SourceDir\ProgramFiles\1C\07.07\mxl2xl.dll" Vital="no"/>
      </Component>
      <Component Id="mxl2xlSettings" Guid="255B5C64-D41A-4638-8BFA-DFC4A4988D75" Location="local" Directory="SystemFolder" Feature="Enterprise77Addins_MXL">
        <RegistryKey Root="HKCU" Key="Software\Microsoft\Office\">
          <RegistryKey Key="8.0\Excel\Converters">
            <RegistryValue Name="Moxel" Type="string" Value='Данные "1С:Предприятие" (*.mxl),[#mxl2xl.dll], *.mxl'/>
          </RegistryKey>
          <RegistryKey Key="9.0\Excel\Converters">
            <RegistryValue Name="Moxel" Type="string" Value='Данные "1С:Предприятие" (*.mxl),[#mxl2xl.dll], *.mxl'/>
          </RegistryKey>
          <RegistryKey Key="10.0\Excel\Converters">
            <RegistryValue Name="Moxel" Type="string" Value='Данные "1С:Предприятие" (*.mxl),[#mxl2xl.dll], *.mxl'/>
          </RegistryKey>
          <RegistryKey Key="11.0\Excel\Converters">
            <RegistryValue Name="Moxel" Type="string" Value='Данные "1С:Предприятие" (*.mxl),[#mxl2xl.dll], *.mxl' KeyPath="yes"/>
          </RegistryKey>
          <RegistryKey Key="12.0\Excel\Converters">
            <RegistryValue Name="Moxel" Type="string" Value='Данные "1С:Предприятие" (*.mxl),[#mxl2xl.dll], *.mxl'/>
          </RegistryKey>
        </RegistryKey>
      </Component>
    </ComponentGroup>

    <Feature Id="Enterprise60" Title="1С Предприятие 6.0" Level="200" AllowAdvertise="no" ConfigurableDirectory="DIR1CV60" InstallDefault="local" TypicalDefault="install" Absent="allow">
      <ComponentGroupRef Id="1Cv60main"/>
      <ComponentGroupRef Id="SystemComponents"/>
    </Feature>
    <Feature Id="Enterprise77" Title="1С Предприятие 7.7" Level="100" Absent="disallow" AllowAdvertise="yes" InstallDefault="local" TypicalDefault="advertise" ConfigurableDirectory="DIR1CV77">
      <ComponentGroupRef Id="1Cv77main"/>
      <ComponentGroupRef Id="1Cv77DBEngineDBF"/>
      <ComponentGroupRef Id="SystemComponents"/>

      <ComponentGroupRef Id="1Cv771CPP"/>
      <ComponentGroupRef Id="1Cv77MXL"/>
      <Feature Id="Enterprise77Help" Title="Справка" Level="100" Absent="allow" AllowAdvertise="yes" InstallDefault="source" TypicalDefault="advertise">
        <ComponentGroupRef Id="_1Cv77help"/>
      </Feature>
      <Feature Id="Enterprise77Addins" Title="Расширения" Level="50" Absent="allow" AllowAdvertise="yes" InstallDefault="local" TypicalDefault="advertise">
        <Feature Id="Enterprise77Addins_v7plus" Title="v7+" Level="10" Absent="allow" AllowAdvertise="yes" InstallDefault="local" TypicalDefault="advertise">
          <ComponentGroupRef Id="_1Cv77plus"/>
        </Feature>
        <Feature Id="Enterprise77Addins_chart" Title="Диаграммы" Level="50" Absent="allow" AllowAdvertise="yes" InstallDefault="local" TypicalDefault="advertise">
          <ComponentGroupRef Id="1Cv77chart"/>
        </Feature>
        <Feature Id="Enterprise77Addins_CRM" Title="Компоненты CRM" Level="20" Absent="allow" AllowAdvertise="yes" InstallDefault="local" TypicalDefault="advertise">
          <ComponentGroupRef Id="1Cv77CRM"/>
        </Feature>
        <Feature Id="Enterprise77Addins_1cpp" Title="1C++" Level="11" Absent="allow" AllowAdvertise="yes" InstallDefault="local" TypicalDefault="advertise">
          <ComponentGroupRef Id="1Cv771CPP"/>
        </Feature>
        <Feature Id="Enterprise77Addins_BarCode" Title="Печать штрих-кодов" Level="50" Absent="allow" AllowAdvertise="yes" InstallDefault="local" TypicalDefault="advertise">
          <ComponentGroupRef Id="BarCodeOCX"/>
        </Feature>
        <Feature Id="Enterprise77Addins_DPP" Title="Интерфейс с ККМ" Level="150" Absent="allow" AllowAdvertise="yes" InstallDefault="local" TypicalDefault="advertise">
          <ComponentGroupRef Id="DPP"/>
        </Feature>
        <Feature Id="Enterprise77Addins_Scanners" Title="Интерфейс со сканерами штрих-кодов" Level="150" Absent="allow" AllowAdvertise="yes" InstallDefault="local" TypicalDefault="advertise">
          <ComponentGroupRef Id="BarCodeScanners"/>
        </Feature>
        <Feature Id="Enterprise77Addins_MXL" Title="Конфертор .mxl (MS Excel)" Level="10" Absent="allow" AllowAdvertise="yes" InstallDefault="local" TypicalDefault="advertise">
          <ComponentGroupRef Id="1Cv77MXL"/>
        </Feature>
      </Feature>
    </Feature>

    <InstallExecuteSequence>
      <RemoveExistingProducts After="InstallFinalize"/>
      <Custom Action="SetWorkDir" After="CostFinalize">
        <![CDATA[$MainExe>=3]]>
      </Custom>
    </InstallExecuteSequence>

    <UIRef Id="WixUI_Mondo"/>
    <UIRef Id="WixUI_ErrorProgressText"/>

  </Product>
</Wix>

В результате мы получаем msi даже с интерфейсом, пусть и с минимальным.

Любый вопросы по данному пакету задавайте в комментариях, отвечу.

Отзывы » (3)

  1. shs:

    а почему просто не использовать административную установку 1c?

    • Есть целый ряд возражений:

      1. Такой подход использовали. Исполняемые файлы располагались в сети. Однако, при использовании ряда сторонних компонент (в частности — 1С++) при малейших проблемах в сети всё приложение 1С «вылетало» без объяснения причин. Вылечить смоги размещением исполняемых файлов локально, потому как на тот момент ждать оптики по всей площадки не могли себе позволить. А в случае размещения локально — нужен механизм распространения. Вот и MSI пригодился + GPO.
      2. Кроме того, опять-таки некоторые сторонние компоненты сильно желают внести свою лепту в реестр пользователя (HKCU) при регистрации и до использования. И не хотят без этого работать. Чтобы не перекладывать эти проблемы на плечи 1С программистов, и было решено подготовить msi пакет с поддержкой «самовосстановления». При попытке использования уже запущенным приложением того либо иного компонента, ещё не зарегистрированного в реестре пользователя, или — с отсутствующими по тем или иным причинам файлами, msi пакет на лету доустановит и дорегистрирует (при этом — пользователь не имеет повышенных привилегий) всё, что необходимо, и приложение продолжит свою работу безо всяких проблем.
      3. При переустановке ПК и развёртывании новых релизов платформы не хочется тратить время на рутинные операции.
      • shs:

        Спасибо за подробный ответ. Мне, честно говоря, с описанными вами проблемами сталкиваться не приходилось (за исключением, быть может, редкой необходимости регистрации неких dll’лек) на клиентской стороне. Посему, пользую административную установку. Но ваше обоснование мне понравилось, возможно, возьму на вооружение, в случае возникновения аналогичных проблем ;)
        Спасибо.

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

XHTML: Вы можете использовать следующие HTML теги: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Tags Связь с комментариями статьи:
RSS комментарии
Обратная ссылка