vb6 “regfreecom"为 ocx 文件自动创建清单 [英] vb6 "regfreecom" autocreate manifest for ocx file

查看:25
本文介绍了vb6 “regfreecom"为 ocx 文件自动创建清单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想我需要为 MSCOMCTL.ocx 创建一个清单文件,以便在我的 VB6 应用程序中使用(无注册)
我还需要更新/创建 .res 文件然后我需要使用 ManifestCreatorII 已经几年了(2017 年),我忘记了步骤,找不到我的旧笔记.
我~记得如何使用 NSI 来生成安装包.没有这个,我无法让我的应用程序在新的 Win 10 PC 上运行.

I think I need to create a manifest file for MSCOMCTL.ocx to use in my VB6 application (reg free)
I will also need to update/create the .res file Then I will need to use ManifestCreatorII It has been a few years (2017) and I have forgotten the steps and cannot find my old notes.
I ~remember how to work with the NSI to generate the install package. Without this, I cannot get my applications to run on a new Win 10 PC.

我的开发 PC 是一台运行 Windows XP(32 位)Service Pack 3 的虚拟 PC.我正在使用 Visual Basic 6.0 (SP6) 进行编程.

My Development PC is a virtual PC running Windows XP (32bit) Service Pack 3. I am programming with Visual Basic 6.0 (SP6).

通过这些实验告诉我,我确实真的需要用于我的 VB6 程序中的组件的每个 Dependency .ocx 文件的清单文件.

Working through these experiments taught me that I do NOT really need manifest files for each of the Dependency .ocx files used for the Components in my VB6 programs.

我真的只需要整个应用程序的一个清单文件,用于为项目创建资源文件.

I really only need the one manifest file for the application program as a whole and that is used to create the Resource file for the project.

当我安装 NSIS 包并在新的 Win10(64) PC 上运行其 VB6 程序时,我的问题首次出现:

My problem was first indicated when I installed the NSIS package and ran its VB6 program on a new Win10(64) PC:

运行时错误 339:组件MSCOMCTL.OCX"或其依赖项之一未正确注册:文件丢失或无效

当我尝试打开最近添加的表单之一时收到此错误消息.

I got this Error message when I tried to open one of the more recently added forms.

此表单的一个独特功能是使用引用 MSCOMCTL.ocx 的选项卡式对话控件 (TabStrip).

A unique feature of this form is the use of Tabbed Dialogue Controls (TabStrip) which references MSCOMCTL.ocx.

回复:https://www.processlibrary.com/en/目录/文件/mscomctl/19764/

mscomctl.ocx 是一个 ActiveX 控件模块,包含 Windows 使用的常用控件,如 ImageCombo、ImageList、ListView、ProgressBar、Slider、StatusBar、TabStrip、ToolBar 和 TreeView 控件.

我创建了一个小程序 zMSCOMCTL,它有一个表单,其中仅包含来自一个 MSCOMCTL.ocx 组件的两个控件(TabStrip 和 ProgressBar).

I created a tiny program, zMSCOMCTL, which has one form containing only two controls (TabStrip and ProgressBar) both from the one MSCOMCTL.ocx Component.

我抄袭了我类似的小程序(例如:zRichTx、zThreeD、zCOMDLG)的 VB6 代码和 NSIS.

I plagiarized from VB6 code and NSIS of my similar tiny programs (e.g.: zRichTx, zThreeD, zCOMDLG).

当我在我的新 Win10(64) PC 上安装并尝试运行 zMSCOMCTL 时,我收到同样的错误消息:运行时错误 339:组件MSCOMCTL.OCX"或其依赖项之一未正确注册:文件丢失或无效

When I install and try to run zMSCOMCTL on my new Win10(64) PC, I get this same error message: Run-time error 339: Component 'MSCOMCTL.OCX' or one of its dependencies not correctly registered: a file is missing or invalid

我从 https://www.ocxme.com 下载了一份 MSCOMCTL.ocx 版本 6.1.98.46

I downloaded a copy MSCOMCTL.ocx version 6.1.98.46 from https://www.ocxme.com

这些说明基于:https://originaldll.com/file/mscomctl.ocx/16903.html

  • 制作了一个备份副本:C:WINDOWSsystem32MSCOMCTL.*
  • 在命令提示符窗口中:regsvr32/u MSCOMCTL.ocx
  • 已删除C:WINDOWSsystem32MSCOMCTL.*
  • 将新的 MSCOMCTL.ocx 复制到 C:WINDOWSsystem32
  • 重启
  • 在命令提示符窗口中:regsvr32 MSCOMCTL.ocx

A.创建 MSCOMCTL.ocx.manifest:

A. create MSCOMCTL.ocx.manifest:

  • 在命令提示符窗口中:regsvr42 MSCOMCTL.ocx
  • 我用 NotePad++ 修改
    • .sxs. 改为 .ocx.
    • type=win32" 更改为 processorArchitecture=x86"type="win32"
    • <file name=MSCOMCTL.ocx"> 更改为
    • In the Command Prompt Window:regsvr42 MSCOMCTL.ocx
    • I used NotePad++ to Modify
      • .sxs. changed to .ocx.
      • type="win32" changed to processorArchitecture="x86" type="win32"
      • <file name="MSCOMCTL.ocx"> changed to <file name="DependenciesMSCOMCTL.ocx">

      为了提高 ManifestCreatorv2.0.3 接受 MSCOMCTL.ocx.manifest 文件而不需要剪贴板副本的机会.(没有 srtrange 字符或空格)

      To improve chances of ManifestCreatorv2.0.3 accepting MSCOMCTL.ocx.manifest file instead of requiring ClipBoard copy. (No srtrange characters or blanks)

      • 首先,使用 Notepad++ 编辑 MSCOMCTL.ocx.manifest
      • 全选、复制、粘贴到记事本并保存到 MSCOMCTL.ocx.manifest

      B.创建 zMSCOMCTL.exe.manifest

      B. Create zMSCOMCTL.exe.manifest

      • 打开 ManifestCreatorv2.0.3:
      • 清单 >从项目文件 (vbp) zMSCOMCTL.vbp 创建
      • 清单 >附加/合并清单 - 来自文件 MSCOMCTL.ocx.manifest
      • 清单 >导出清单 - 目标磁盘文件
      • 保存到 zMSCOMCTL.exe.manifest(替换)

      回复:http://www.vbforums.com/showthread.php?845909-VB6-Manifest-Creator-II

      C.创建 zMSCOMCTL.res

      C. Create zMSCOMCTL.res

      • 关闭 VB6 zMSCOMCTL 项目或从项目中删除 zMSCOMCTL.res

      • Shut Down VB6 zMSCOMCTL Project or remove zMSCOMCTL.res from Project

      打开 ManifestCreatorv2.0.3:

      Open ManifestCreatorv2.0.3:

      清单 >从项目文件 (vbp) zMSCOMCTL.vbp 创建

      The Manifest > Create from Project File (vbp) zMSCOMCTL.vbp

      清单 >附加/合并清单 - 来自文件 MSCOMCTL.ocx.manifest

      The Manifest > Append/Merge Manifest - From file MSCOMCTL.ocx.manifest

      清单 >出口清单

      The Manifest > Export Manifest

      • [_] 缩进清单
      • [_] 不要使用带前缀的命名空间
      • [x] 不导出空/空白属性
      • 目标资源文件 - 保存到 zMSCOMCTL.res(替换)

      D.制作新的zMSCOMCTL.exe

      D. Make new zMSCOMCTL.exe

      • 打开 VB6 zMSCOMCTL 项目或将 zMSCOMCTL.res 添加回项目中
      • 在 VB6 zMSCOMCTL 项目中,从完整编译开始:运行正常
      • 在 VB6 zMSCOMCTL 项目中,文件 ->制作新的可执行文件:

      运行新的可执行文件:zMSCOMCTL.exe 结果:

      Running the new executable: zMSCOMCTL.exe Results in:

      此应用程序无法启动,因为应用程序配置不正确.重新安装应用程序可能会解决此问题.

      FIRST 试验方法到此结束(失败了)

      回复:VB6 RegFreeCom SideBySide SxS Manifest Test for TABCTL32.ocx

      我从 https://github.com/wqweto/UMMM

      [Find_file] [_Clone_or_download_v] 点击绿色按钮

      使用 HTTPS 克隆通过 Web URL 使用 Git 或通过 SVN 结帐.

      Clone with HTTPS Use Git or checkout with SVN using the web URL.

      [https://github.com/wqweto/UMMM.git]

      [Open_in_Desktop] [Download_ZIP] 然后点击Download_ZIP按钮

      • 我展开了下载的 UMMM-master.zip 文件.
      • 生成的 .src 文件夹包含以下文件:mdUmmm.bas 和 Ummm.vbp.
      • 我将它们复制到他们自己的 UMMM-master Project 文件夹中
      • 我快速浏览了 mdUmmm.bas 和 Ummm.vbp.
      • Ummm.vbp 引用 SysWOW64.
      • 在记事本中,我将其更改为 System32.开发平台为WinXP(32)
      • 我用 VB6 打开了 Ummm.vbp
      • 我做了一个 File - Make 来创建 UMMM.exe
      • 我将 UMMM.exe 复制到 C:Program FilesSupport Tools in %path%

      这些是我为 UMMM Unattended Make My Manifest 找到的参考链接:

      These are the reference links I have found for UMMM Unattended Make My Manifest :

      1. https://github.com/wqweto/UMMM
      2. 为免注册 COM 生成清单文件
      3. 免注册COM:VB6可执行引用VB6 DLL
      4. https://github.com/wqweto/UMMM/blob/master/Sample.ini
      5. http://www.vbforums.com/showthread.php?840333-SXS-and-UMMM-with-inter-thread-marshalling
      6. https://github.com/wqweto/UMMM/issues/9
      7. https://github.com/wqweto/UMMM/issues/16

      第一个链接是我创建 .ini 文件的线索.
      第 6 个链接帮助我创建了一个似乎可以工作的 bat 文件!

      The 1st link is where I got my clues to create the .ini file.
      The 6th link helped me create a bat file that seems to work!

      zMSCOMCTLUMMM.ini

      这个 .ini 文件,在 Identity 行之后,包含一个依赖文件列表.它们列在 .vbp 文件中(例如:Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.2#0; mscomctl.ocx).

      This .ini file, following the Identity line, contains a list of dependency files. They are listed in the .vbp file (e.g.: Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.2#0; mscomctl.ocx ).

      您还可以在 VB6 菜单中找到它们的详细列表 >项目>组件 ...

      You can also find them itemized within VB6 Menu > Project > Components ...

      在该组件表单上,您可以选择 [x] Selected Items Only 以更轻松地查看列表.

      On that Components form, you can choose [x] Selected Items Only to more easily view the list.

      突出显示列表中的每个组件将显示如下:(例如:位置 C: ... MSCOMCTL.OCX)

      Highlighting each Component in the list will display, below: (e.g.: Location C: ... MSCOMCTL.OCX )

      在.ini文件中,我指定了依赖文件的路径,因为它没有存储在本地Project文件夹中.

      In the .ini file, I specify the path to the dependency file because it is not stored in the local Project folder.

      Identity zMSCOMCTL.exe zMSCOMCTL.exe "MSCOMCTL Test program 1.0"  
      File C:WINDOWSsystem32mscomctl.ocx
      


      zMSCOMCTLUMMM.bat

      UMMM.exe zMSCOMCTLUMMM.ini .manifestzMSCOMCTL.exe.manifest
      
      pause done?
      


      有没有办法在 UMMM (Unattended Make My Manifest) 创建 Program.exe.manifest 时指定 File Name=?

      我用记事本编辑了生成的 zMSCOMCTL.exe.manifest 并进行了更改:

      I edited the resulting zMSCOMCTL.exe.manifest with Notepad and changed:

      From: <file name="........WINDOWSsystem32MSCOMCTL.ocx">
      To: <file name="DependenciesMSCOMCTL.ocx"> 
      


      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
          <assemblyIdentity name="zMSCOMCTL" processorArchitecture="X86" type="win32" version="1.1.0.24" />
          <description>MSCOMCTL Test program 1.0</description>
          <file name="DependenciesMSCOMCTL.ocx">
              <typelib tlbid="{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}" version="2.2" flags="control,hasdiskimage" helpdir="" />
              <comClass clsid="{1EFB6596-857C-11D1-B16A-00C0F0283628}" tlbid="{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}" progid="MSComctlLib.TabStrip.2" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst">
                  <progid>MSComctlLib.TabStrip</progid>
              </comClass>
              <comClass clsid="{24B224E0-9545-4A2F-ABD5-86AA8A849385}" tlbid="{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
              <comClass clsid="{9A948063-66C3-4F63-AB46-582EDAA35047}" tlbid="{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
              <comClass clsid="{66833FE6-8583-11D1-B16A-00C0F0283628}" tlbid="{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}" progid="MSComctlLib.Toolbar.2" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,actslikelabel,alignable,simpleframe,setclientsitefirst">
                  <progid>MSComctlLib.Toolbar</progid>
              </comClass>
              <comClass clsid="{7DC6F291-BF55-4E50-B619-EF672D9DCC58}" tlbid="{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,actslikelabel,alignable,simpleframe,setclientsitefirst" />
              <comClass clsid="{8B2ADD10-33B7-4506-9569-0A1E1DBBEBAE}" tlbid="{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,actslikelabel,alignable,simpleframe,setclientsitefirst" />
              <comClass clsid="{8E3867A3-8586-11D1-B16A-00C0F0283628}" tlbid="{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}" progid="MSComctlLib.SBarCtrl.2" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,actslikelabel,alignable,setclientsitefirst">
                  <progid>MSComctlLib.SBarCtrl</progid>
              </comClass>
              <comClass clsid="{627C8B79-918A-4C5C-9E19-20F66BF30B86}" tlbid="{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,actslikelabel,alignable,setclientsitefirst" />
              <comClass clsid="{585AA280-ED8B-46B2-93AE-132ECFA1DAFC}" tlbid="{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,actslikelabel,alignable,setclientsitefirst" />
              <comClass clsid="{35053A22-8589-11D1-B16A-00C0F0283628}" tlbid="{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}" progid="MSComctlLib.ProgCtrl.2" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,actslikelabel,alignable,setclientsitefirst">
                  <progid>MSComctlLib.ProgCtrl</progid>
              </comClass>
              <comClass clsid="{A0E7BF67-8D30-4620-8825-7111714C7CAB}" tlbid="{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,actslikelabel,alignable,setclientsitefirst" />
              <comClass clsid="{C74190B6-8589-11D1-B16A-00C0F0283628}" tlbid="{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}" progid="MSComctlLib.TreeCtrl.2" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst">
                  <progid>MSComctlLib.TreeCtrl</progid>
              </comClass>
              <comClass clsid="{9181DC5F-E07D-418A-ACA6-8EEA1ECB8E9E}" tlbid="{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
              <comClass clsid="{95F0B3BE-E8AC-4995-9DCA-419849E06410}" tlbid="{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
              <comClass clsid="{DD2DBE12-F9F8-4E32-B087-DAD1DCEF0783}" tlbid="{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
              <comClass clsid="{BDD1F04B-858B-11D1-B16A-00C0F0283628}" tlbid="{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}" progid="MSComctlLib.ListViewCtrl.2" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst">
                  <progid>MSComctlLib.ListViewCtrl</progid>
              </comClass>
              <comClass clsid="{996BF5E0-8044-4650-ADEB-0B013914E99C}" tlbid="{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
              <comClass clsid="{979127D3-7D01-4FDE-AF65-A698091468AF}" tlbid="{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
              <comClass clsid="{CCDB0DF2-FD1A-4856-80BC-32929D8359B7}" tlbid="{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
              <comClass clsid="{2C247F23-8591-11D1-B16A-00C0F0283628}" tlbid="{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}" progid="MSComctlLib.ImageListCtrl.2" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,invisibleatruntime,alignable,setclientsitefirst">
                  <progid>MSComctlLib.ImageListCtrl</progid>
              </comClass>
              <comClass clsid="{F91CAF91-225B-43A7-BB9E-472F991FC402}" tlbid="{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,invisibleatruntime,alignable,setclientsitefirst" />
              <comClass clsid="{556C2772-F1AD-4DE1-8456-BD6E8F66113B}" tlbid="{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,invisibleatruntime,alignable,setclientsitefirst" />
              <comClass clsid="{F08DF954-8592-11D1-B16A-00C0F0283628}" tlbid="{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}" progid="MSComctlLib.Slider.2" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst">
                  <progid>MSComctlLib.Slider</progid>
              </comClass>
              <comClass clsid="{0B314611-2C19-4AB4-8513-A6EEA569D3C4}" tlbid="{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
              <comClass clsid="{DD9DA666-8594-11D1-B16A-00C0F0283628}" tlbid="{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}" progid="MSComctlLib.ImageComboCtl.2" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst">
                  <progid>MSComctlLib.ImageComboCtl</progid>
              </comClass>
              <comClass clsid="{87DACC48-F1C5-4AF3-84BA-A2A72C2AB959}" tlbid="{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
          </file>
      </assembly>
      


      接下来使用ManifestCreatorv2.0.3创建zMSCOMCTL.res文件

      • 清单 >从项目文件 (vbp) zMSCOMCTL.vbp 创建

      • The Manifest > Create from Project File (vbp) zMSCOMCTL.vbp

      清单 >附加/合并清单 - 从文件 [例如:.manifestMSCOMCTL.exe.manifest]

      The Manifest > Append/Merge Manifest - From file [e.g.: .manifestMSCOMCTL.exe.manifest]

      清单 >出口清单 >

      The Manifest > Export Manifest >

      [_] 缩进清单

      • [_] 不要使用带前缀的命名空间
      • [x] 不导出空/空白属性
      • 目标资源文件 - 保存到 zMSCOMCTL.res(替换)

      打开 VB6 zMSCOMCTL 项目或将 zMSCOMCTL.res 添加回项目中

      Open VB6 zMSCOMCTL Project or Add zMSCOMCTL.res back into Project

      编译、构建和测试程序.

      • 在 VB6 zMSCOMCTL 项目中,开始完全编译:运行正常
      • 在 VB6 zMSCOMCTL 项目中,文件 ->制作新的可执行文件:
      • 保存项目
      Running zMSCOMCTL.exe from with in its Project folder:
      `[Run-Error 7 out of memory?]` 
      


      构建并使用 NSIS 文件创建 SxS 安装文件,以便在任何目标 PC 上进行测试.


      Build and use the NSIS file to create the SxS installation file for testing on any target PCs.

      NSIS 文件构建可执行程序以:

      - Determine if the target operating system is [AtLeastWinVista] and if it is [RunningX64].
      - Request a selection from the available Harddrives / Partitions for installation.
      - Based on this criteria, it creates an InstallDirectory and an InstallDirectoryDependencies subdirectory.
      - Copies the Program.exe into the InstallDirectory.
      - Copies the Dependency files into the InstallDirectoryDependencies subdirectory.
      - Also based on this criteria it creates a Public read/write data directory.
      - Creates desktop shortcut
      - Creates start-menu items
      - Creates an Uninstall mechanism
      

      我调整了 NSIS 文件以仅安装 .vbp 文件、UMMM.ini 文件和生成的 .exe.manifest 文件中列出的依赖项文件.

      I adjusted the NSIS file to install only the dependency files listed in the .vbp file, the UMMM.ini file and in the resulting .exe.manifest file.

      安装在 WinXP(32) 上运行正常
      安装在Win7(64)上工作正常
      安装在Win10(64)上工作正常

      推荐答案

      这是我维护的一个 VB6 应用程序的清单文件中的条目:

      Here is the entry from the manifest file from one of the VB6 apps I maintain:

      <assemblyIdentity name="name of application" processorArchitecture="X86" type="win32" version="a.b.c.d" />
      

      ...

      <file name="tabctl32.ocx">
          <typelib tlbid="{BDC217C8-ED16-11CD-956C-0000C04E4C0A}" version="1.1" flags="control,hasdiskimage" helpdir="" />
          <comClass clsid="{BDC217C5-ED16-11CD-956C-0000C04E4C0A}" tlbid="{BDC217C8-ED16-11CD-956C-0000C04E4C0A}" progid="TabDlg.SSTab.1" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,simpleframe,setclientsitefirst">
              <progid>TabDlg.SSTab</progid>
          </comClass>
          <comClass clsid="{942085FD-8AEE-465F-ADD7-5E7AA28F8C14}" tlbid="{BDC217C8-ED16-11CD-956C-0000C04E4C0A}" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,simpleframe,setclientsitefirst" />
      </file>
      

      使用 https://github.com/wqweto/UMMM 从 OCS 版本 6.1.98.39 生成使用这样的 INI 配置文件行:

      generated from OCS version 6.1.98.39 using https://github.com/wqweto/UMMM using a INI configuration file line like so:

      File tabctl32.ocx
      

      这与问题中的有所不同:

      This is somewhat different from the one in the question:

      • 有文件的相对路径

      • Has a relative path to the file

      不同的类列表

      各种不同的属性

      如果不进行实验,很难说这些差异有多么重要.

      Hard to say without experimentation how important those differences might be.

      我强烈建议您在 Process Monitor 中记录您的程序并查看日志中出现的任何错误.这通常是我识别棘手的明显问题的方式.

      I highly recommend logging your program in Process Monitor and seeing what if any errors you get in the log. This is usually how I identify tricky manifest problems.

      这篇关于vb6 “regfreecom"为 ocx 文件自动创建清单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆