MSIEXEC - 嵌入 [英] MSIEXEC -Embedding
问题描述
下午好,
我需要一些处理 Windows 安装程序的 Microsoft 专家的帮助?
I need some help from some Microsoft gurus that deal with windows installer?
我正在尝试使用虚拟机上 Windows 中的调试键来监视 msiexec,并试图完全了解 Msiexec 如何完全解析命令行.
I am trying to monitor msiexec utilising the debug keys within windows on a virtual machine and trying to fully understand how Msiexec is fully parsing command lines.
我已经设置了HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\msiexec.exe
I have set up the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\msiexec.exe
重定向到示例应用程序以监控解析的命令行.
Redirected into a sample application to monitor command line parsed.
我遇到了许多删除应用程序和安装例如 C++ 可再发行组件的示例.
I have come across numerous examples from removing applications and installing for example C++ redistributable's.
我了解标准的普通命令行,但无法了解 -embedding 开关的使用方式.
I understand the standard normal command line but cannot get to understand how the -embedding switch is utilised.
语法一般是-Embedding 2FD6A2BDD8FE7E3EE9AD31C2970C272C A
The syntax is generally -Embedding 2FD6A2BDD8FE7E3EE9AD31C2970C272C A
我试过在注册表中搜索,但对 semi Guid 没有用?
I have tried searching through the registry and no avail for semi Guid?
A - 似乎表示安装.C - 似乎表示移除.
A - seems to signify a install. C - seems to signify a removal.
任何人都知道我可以查看的良好文档以了解正在发生的事情,这是我几天前问的另一个问题的背后,我觉得已经得到了回答.
Anyone know of good documentation that i can look at to understand what is happening, this is on the back of another question i asked a few days ago which i feel has been answered.
msiexec MsiSetExternalUI 的外部处理程序>
推荐答案
如何重新排列 guid
How are the guids rearranged
它们就是微软所说的压缩".他们为什么打扰是个谜,但是……无论如何.我还看到它们被称为达尔文转换的 GUID".这是一个脚本,您可以向其提供 GUID 以获取压缩文件,反之亦然:
They are what Microsoft calls "compressed". Quite why they bother is a mystery but...whatever. I also seen them referred to as "Darwinian transformed GUIDs." Here's a script that you can feed GUIDs to to get a compressed one and vice-versa:
'strCode = "{87E21645-7A8E-454D-B899-0317F2AEE9B9}"
strMungedCode = "4659EEA429F218A4CAEDA156497418B7"
'Call MungeProductCode(strCode, strMungedCode)
'WScript.Echo strCode & " munged becomes " & strMungedCode
Call UnMungeProductCode(strMungedCode, strCode)
WScript.Echo strMungedCode & " unmunged becomes " & strCode
Sub MungeProductCode(ByVal strProductCode, ByRef strMungedCode)
'// This routine munges the ProductCode into the munged format
'// used by various registry entries for Windows Installer
'// For example: {D650B8A9-C547-42D3-A7DF-0FAD0AC6E9ED}
'// becomes
'// 9A8B056D745C3D247AFDF0DAA06C9EDE
Dim arrSortOrder
Dim strNewCode
Dim intIndex
arrSortOrder = Array(9,8,7,6,5,4,3,2,14,13,12,11,19,18,17,16,22,21,24,23,27,26,29,28,31,30,33,32,35,34,37,36)
'// Generate the munged code
For intIndex = 0 To UBound(arrSortOrder)
strNewCode = strNewCode & Mid(strProductCode,arrSortOrder(intIndex),1)
Next
strMungedCode = strNewCode
End Sub
Sub UnMungeProductCode(ByVal strMungedCode, ByRef strProductCode)
'// This routine reconstructs a ProductCode from the munged format
'// used by various registry entries for Windows Installer
'// For example: 9A8B056D745C3D247AFDF0DAA06C9EDE
'// becomes
'// {D650B8A9-C547-42D3-A7DF-0FAD0AC6E9ED}
Dim arrSortOrder
Dim intIndex
Dim strPartTemp
Dim strPart1
Dim strPart2
Dim strPart3
Dim strPart4
Dim strPart5
'// Part 1
strPartTemp = Left(strMungedCode, 8)
strPart1 = StrReverse(strPartTemp)
'// Part 2
strPartTemp = Mid(strMungedCode, 9, 4)
strPart2 = StrReverse(strPartTemp)
'// Part 3
strPartTemp = Mid(strMungedCode, 13, 4)
'// Excuse me! May I borrow these variables for a moment?
strPart3 = Left(strPartTemp, 2)
strPart4 = Right(strPartTemp, 2)
strPart3 = StrReverse(strPart4) & StrReverse(strPart3)
'// Now deal with part 4 properly
strPartTemp = Mid(strMungedCode, 17, 2)
strPart4 = Mid(strMungedCode, 19, 2)
strPart4 = StrReverse(strPartTemp) & StrReverse(strPart4)
strPartTemp = Mid(strMungedCode, 21, 12)
arrSortOrder = Array(2,1,4,3,6,5,8,7,10,9,12,11)
'// Generate the product code
For intIndex = 0 To UBound(arrSortOrder)
strPart5 = strPart5 & Mid(strPartTemp,arrSortOrder(intIndex),1)
Next
strProductCode = ""
strProductCode = strProductCode & "{"
strProductCode = strProductCode & strPart1
strProductCode = strProductCode & "-"
strProductCode = strProductCode & strPart2
strProductCode = strProductCode & "-"
strProductCode = strProductCode & strPart3
strProductCode = strProductCode & "-"
strProductCode = strProductCode & strPart4
strProductCode = strProductCode & "-"
strProductCode = strProductCode & strPart5
strProductCode = strProductCode & "}"
End Sub
这篇关于MSIEXEC - 嵌入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!