在 Windows 上安装应用程序期间捕获所有更改
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1074556/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Capturing all changes during an application install on Windows
提问by MagicAndi
I need to monitor and report on all changes (folders and directories added, permissions changed, registry entries added) that are made during the installation of a software program. Can anyone suggest a tool that is capable of doing this?
我需要监视和报告在安装软件程序期间所做的所有更改(添加的文件夹和目录、更改的权限、添加的注册表项)。任何人都可以建议一种能够做到这一点的工具吗?
Thanks, MagicAndi.
谢谢,MagicAndi。
采纳答案by Stein ?smul
Note: Please see my other answer below as well.
注意:请参阅下面我的其他答案。
Seeing as you want to create a Wix setup, I want to add a new answer with some hints on how to accomplish this in the quickest way.
看到您想要创建一个Wix 设置,我想添加一个新答案,其中包含一些有关如何以最快方式完成此操作的提示。
I would recommend using the InstallRite(no longer available) software to get a log of changesdone by the installer you got. This tool does not allow you to convert the capture into an MSI, but it gives you a good change log (which does contain a bit of junk). The PictureTaker tool appears to have been renamed and is now commercial- it does allow conversion of the capture to MSI though.
我建议使用 安装程序(不再可用)软件以获取您获得的安装程序所做的更改日志。此工具不允许您将捕获转换为 MSI,但它为您提供了一个很好的更改日志(其中确实包含一些垃圾)。PictureTaker 工具似乎已重命名,现在已商业化——不过它确实允许将捕获转换为 MSI。
There seems to be a new capture tool called Scalable Smart Packager CE(link removed Nov, 2017 - target site has changed and looks a little suspicious). I have not tested this tool thoroughly.
似乎有一个新的捕获工具叫做 可扩展智能打包机 CE(链接已于 2017 年 11 月删除 - 目标站点已更改并且看起来有点可疑)。我还没有彻底测试过这个工具。
Once you have your log or capture, you can convert to WIX in 2 "fast track" ways:
获得日志或捕获后,您可以通过 2 种“快速通道”方式转换为 WIX:
- Use the dark.exeWIX MSI decompiler (if you have an MSI already)
- Use the heat.exeWIX harvester tool (to auto-generate WIX XML for folders, registry etc..)
- 使用dark.exeWIX MSI 反编译器(如果您已经有 MSI)
- 使用heat.exeWIX 收集器工具(为文件夹、注册表等自动生成 WIX XML。)
If you use the dark.exetool you should get a complete WIX XML file that you can then compile again - but you should clean it up a bit (take out the UI junk, then link with WIX's detault built-in GUI etc...).
如果你使用dark.exe工具,你应该得到一个完整的WIX XML文件,然后你可以再次编译——但你应该清理一下(取出UI垃圾,然后与WIX的detault内置GUI等链接。 .)
Using heat.exeis the cleaner way. You simply run the heat.exe tool against a folder, and it will create WIX XML elements for you to install those files. You will then need to put it all together in a WIX source files along with other required sections. I can provide you with a basic WIX "minimal sample" to get you going (I don't seem to be able to attach files here).
使用heat.exe是更干净的方式。您只需对文件夹运行 heat.exe 工具,它就会为您创建 WIX XML 元素以安装这些文件。然后,您需要将它们与其他必需的部分一起放在 WIX 源文件中。我可以为您提供一个基本的 WIX“最小样本”来帮助您(我似乎无法在此处附加文件)。
回答by MagicAndi
Looks like this is a duplicate of a question answered already on ServerFault(my bad!). The answers given there are:
看起来这是一个已经在 ServerFault 上回答的问题的副本(我的错!)。那里给出的答案是:
- Process Monitorfrom SysInternals Software
- Total Uninstallfrom Martau.com
回答by Stein ?smul
UPDATE: Stefan Kruger's comprehensive list of repackaging tools at installsite.org.
Your question is a bit open ended since it is not entirely clear what the overall goalis:
您的问题有点开放,因为尚不完全清楚总体目标是什么:
- Application Repackaging: capture all changes and then package them into a deployable package format such as MSI (or similar).
- Reporting / Monitoring: just looking for a way to "see what happens" during an installation.
- 应用程序重新打包:捕获所有更改,然后将它们打包成可部署的包格式,例如 MSI(或类似格式)。
- 报告/监控:只是寻找一种方法来“查看安装过程中会发生什么”。
For application repackagingthe main tool is AdminStudio(the main competitor "Wise InstallStudio" was pulled from market due to legal issues, see Wise section here: What installation product to use? InstallShield, WiX, Wise, Advanced Installer, etc).
对于应用程序重新打包,主要工具是AdminStudio(主要竞争对手“Wise InstallStudio”由于法律问题被撤出市场,请参阅此处的 Wise 部分:使用什么安装产品?InstallShield、WiX、Wise、Advanced Installer 等)。
AdminStudiohas very comprehensive feature sets and a hefty price tag (and learning curve). You could try to use the trial version to do your repackaging and see if the resulting MSI is useable. If it is not you can convert it to a Wix MSI relatively easily via the dark.exe Wix tool.
AdminStudio具有非常全面的功能集和高昂的价格标签(和学习曲线)。您可以尝试使用试用版进行重新打包,看看生成的 MSI 是否可用。如果不是,您可以通过dark.exe Wix 工具相对轻松地将其转换为Wix MSI。
Then there used to be more light weight toolssuch as PictureTakerand InstallRitewhich I suppose were better suited for "reporting purposes" but could be used for MSI creation. Both these tools seem to have disappeared as well.
然后曾经有更轻量级的工具,例如PictureTaker和InstallRite,我认为它们更适合“报告目的”,但可用于 MSI 创建。这两个工具似乎也消失了。
There seems to be a new capture tool called Scalable Smart Packager CE(removed broken link Jan, 2018 - the tool appears discontinued). I have not tested this tool thoroughly.
似乎有一个新的捕获工具叫做 可扩展智能打包机 CE(删除了断开的链接,2018 年 1 月 - 该工具似乎已停止使用)。我还没有彻底测试过这个工具。
UPDATE: I just removed a broken link to Scalable Smart Packager CE (appears discontinued). For repackaging software / tools, perhaps see Stefan Kruger's comprehensive list at installsite.org. Hard to keep up with all these tools that are useful but end up deprecated.
更新:我刚刚删除了 Scalable Smart Packager CE 的断开链接(似乎已停产)。对于重新打包软件/工具,请参阅installsite.org 上Stefan Kruger 的综合列表。很难跟上所有这些有用但最终被弃用的工具。
You could use the method suggested here: Tracking file and registry changes, or you can try to locate the old version of WININSTALL LEon a Windows 2000 Server CDin \VALUEADD\3RDPARTY\MGMT\WINSTLE
.
你可以使用这里提出的方法:跟踪文件和注册表的变化,或者你可以尝试找到旧版本的WININSTALL LE一个在Windows 2000 Server光盘在\VALUEADD\3RDPARTY\MGMT\WINSTLE
。
I believe Advanced Installerallows capture, but I am not sure you can export a proper MSI file with the trial version (or at all for that matter).
我相信Advanced Installer允许捕获,但我不确定您是否可以使用试用版导出正确的 MSI 文件(或根本无法导出)。
回答by Thomas Beck
I've used Process Monitor on multiple occasions to document the impacts of installing COTS software on servers. Has always seemed to do the trick.
我曾多次使用 Process Monitor 来记录在服务器上安装 COTS 软件的影响。似乎总是能成功。
回答by Leon thomas
There is a programme called "sandboxie" You'll need to configure it once its installed for it to work properly. run sandboxie. drag and drop the installation file into the gui and watch it try to install. Sandboxie creates a log of everything that happens. While it redirects all of the exe - DLL - inf - scripts and everything else into a quarantine file instead. The SB GUI then lays out the file structure to all the intended installation locations.
有一个名为“sandboxie”的程序,您需要在安装后对其进行配置才能正常工作。运行沙盒。将安装文件拖放到 gui 中并观看它尝试安装。Sandboxie 创建所有发生的事情的日志。虽然它将所有 exe - DLL - inf - 脚本和其他所有内容重定向到隔离文件中。然后 SB GUI 将文件结构布置到所有预期的安装位置。
Any download Im not too sure is legitimate, now gets downloaded and executed straight through SB's web browser feature. I can then check it all out and it never infects my system if it is naughty.
我不太确定任何下载是否合法,现在可以直接通过 SB 的网络浏览器功能下载和执行。然后我可以检查所有内容,如果它很顽皮,它永远不会感染我的系统。
On the other hand...
另一方面...
If it was a online installer.exe that was executed in SB gui, youll now have a copy of everything that makes up the installer package. Place it all in a file on a USB, make a simple autorun.inf and .bat file with notepad++ to create ya own offline installer
如果它是在 SB gui 中执行的在线 installer.exe,您现在将拥有组成安装程序包的所有内容的副本。将其全部放在 USB 上的文件中,使用 notepad++ 制作一个简单的 autorun.inf 和 .bat 文件以创建您自己的离线安装程序
Hope this helps...
希望这可以帮助...