66434

MSIEXEC -Embedding

Question:

Good afternoon,

I need some help from some Microsoft gurus that deal with windows installer?

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.

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.

I have come across numerous examples from removing applications and installing for example C++ redistributable's.

I understand the standard normal command line but cannot get to understand how the -embedding switch is utilised.

The syntax is generally -Embedding 2FD6A2BDD8FE7E3EE9AD31C2970C272C A

I have tried searching through the registry and no avail for semi Guid?

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.

<a href="https://stackoverflow.com/questions/48820194/external-handler-for-msiexec-msisetexternalui/48827939?noredirect=1#comment84672199_48827939" rel="nofollow">External handler for msiexec MsiSetExternalUI</a>

Answer1:

<blockquote>

How are the guids rearranged

</blockquote>

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

Recommend

  • How to create a race track scoreboard in WPF
  • git pull add, commit and push in java [closed]
  • Emscripten can't find path to cmake
  • Unwanted chars written from java REST-API to HadoopDFS using FSDataOutputStream
  • Visual Studio Extention - Context Menu for 'Server Explorer'
  • How do you find the package a Delphi component comes from?
  • dojo: which events are attached to an element?
  • Docker daemon and DNS
  • OpenCL: Additional directories for header files
  • not able to install SSDT for visual studio 2017 professional
  • How to find out the solid color used for the Windows Wallpaper?
  • How to display rendered html content in text widget of tkinter in python 3.4.x
  • gcloud ping attempt failure with performing a 'docker push'
  • Is it possible to manually check LocateRegistry existing?
  • Why would you want to use composition in golang?
  • Django Celery - How to start a task with a delay of n - seconds - countdown flag is ignored
  • TFS Builds: Running the builds as administrator
  • Catching exceptions caused in different threads [duplicate]
  • Have anyone succeeded in ThinApp'ing Visual Studio?
  • How to prevent two volume claims to claim the same volume on Kubernetes?
  • does the FROM directive in a dockerfile allways pull the latest version of an image
  • disablinging autorecover option for powepoint
  • Sql indexes vs full table scan
  • error in docker build publish plugin
  • Class implementation in a header file == bad style? [duplicate]
  • Get all existing pointers to an object
  • AVCaptureSession VS UIImagePickerController camera preview
  • Getting syntax error in mysql-php. You have an error in your SQL syntax;
  • if some function is not optimized does it mean that all functions where it is declared are not optim
  • ZipList with Scalaz
  • Alamofire and Reachability.swift not working on xCode8-beta5
  • Access user's phone number on iOS 7
  • Hide HTML elements without javascript, only CSS
  • Question about instantiating object
  • How to make JSON.NET deserialize to Microsoft Date Time?
  • Copy to all folders batch file?
  • Email verification using google app script and google forms
  • Moving mysql files across servers
  • Extracting HTML between tags
  • javaw.exe and eclipse startup problems