Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Registry entry creation in the windows installer


7 replies to this topic

kirann_hegde

kirann_hegde
  • Full Members
  • 93 posts

Posted 11 June 2012 - 14:35

Hello,


I have been trying to figure this out. So thought of reaching out to a wider audience.
When a msi file creates registry entries using the WriteRegistryValues standard action, i do not find any references in the log file which states that the registry entry is being created under a particular hive.

is it possible to figure out the registry hive under which the registry entry is created just by looking at the log file?
I am aware that opening the registry table using Orca would let me know this information. However , i am keen on figuring out this information from the log file.

Thanks,
Kiran Hegde

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 12 June 2012 - 19:17

Look for log entries like these:

MSI (s) (B8:04) [11:48:27:850]: Executing op: RegOpenKey(Root=-1,Key=Software\Microsoft\Windows\CurrentVersion\Run,,BinaryType=0,,)
MSI (s) (B8:04) [11:48:27:850]: Executing op: RegAddValue(Name=ISUSPM,Value=C:\ProgramData\FLEXnet\Connect\11\\isuspm.exe -scheduler,)

The values for registry root are documented in MSI help topic "Registry Table". In the above example, -1 is the equivalent to InstallShield's HKEY_USER_SELECTABLE which could be either HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE, depending on the value of the ULLUSERS property (which can also be found in the log)

kirann_hegde

kirann_hegde
  • Full Members
  • 93 posts

Posted 13 June 2012 - 06:22

Hello Stephen,

Thanks for the response.
I think the root has the following values:
2147483646
2147483647
2147483648
2147483649
2147483650
2147483651

I am not sure what do these mean.
I do not see the values documented anywhere.

Regards,
Kiran Hegde

VBScab

VBScab
  • Full Members
  • 436 posts

Posted 13 June 2012 - 09:04

Some thinking is called for, a strange, ethereal quality which seems sadly lacking these days...

- Start Calc in 'Scientific' view
- Select 'Dec' if any other type is selected
- Punch in any of the numbers you list, e.g. 2147483649
- Select 'Hex'

Now do the numbers look familiar?

Getting to recognise decimal/hex equivalents will be useful in any software support role you might end up in.
- Don't know why 'x' happened? Want to know why 'y' happened? ProcMon will tell you.
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.

kirann_hegde

kirann_hegde
  • Full Members
  • 93 posts

Posted 15 June 2012 - 09:45

Thanks for the kind words

Some humility is called for, a very much required quality, which seems to be sadly lacking these days.


What saddens me is the fact that people respond without even bothering to correctly read the questions.

[The above sentences are in response to the previous answer]

My question is as follows:
Are these values documented elsewhere, as in MSDN windows installer documentation?

The only reference i see to these values is in winreg.h.
For root, i also see the following values:
-2147483646
no value at all - RegOpenKey(,Key=TypeLib\{238F6F80-B8B4-11CF-8771-00A024541EE3}\2.0,,BinaryType=0)
These are not to be found in even winreg.h

Thanks,
Kiran Hegde







Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 15 June 2012 - 11:22

I only know about the values that are documented in the msi help for the Registry table:
-1 = HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE depending on ALLUSERS
0 = HKEY_CLASSES_ROOT
1 = HKEY_CURRENT_USER
2 = HKEY_LOCAL_MACHINE
3 = HKEY_USERS

The log entires aren't documented. If you are seeing other root values, I think that all you can do is guess. Does matching the log values to the msi Registry table entries make any sense?

kirann_hegde

kirann_hegde
  • Full Members
  • 93 posts

Posted 17 June 2012 - 07:52

Well no.. Anyways thanks for your response.
Appreciate your help

rflum

rflum
  • Full Members
  • 40 posts

Posted 04 September 2014 - 15:31

I had the same question as Kirann, and taking VBScab's suggestion, I get :

-2147483646 dec = FFFFFFFF80000002 hex --- last digit 2
-2147483647 = FFFFFFFF80000001 --- last digit 1
-2147483648 = FFFFFFFF80000000 --- last digit 0
-2147483649 = FFFFFFFF7FFFFFFF --- 15 ??? -1
-2147483650 = FFFFFFFF7FFFFFFE --- 14 ??? -2
-2147483651 = FFFFFFFF7FFFFFFD --- 13 ??? -3

2147483648 = 80000000 --- last digit 0

2147483649 = 80000001 --- last digit 1
2147483650 = 80000002 --- last digit 2
2147483651 = 80000003 --- last digit 3

 

The "no value" example in Kirann's June 15th post (and many in my logfiles) looks like a registry branch that should go in HKCR, which in Stefan's list has a value of 0.  HKCR is also the only hive that has a TypeLib key directly under the root.  I think it's reasonable to assume that no value for the Root parameter means it defaults to 0.

The -2147483646 value in my logfiles is creating a key at SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs, which only appears under HKLM, which in Stefan's list has a value of 2.  Again, I think it's a reasonable assumption that -2147483646 refers to the HKLM root.

 

This doesn't explain Stefan's -1 value, which should be -2147483649 if you take it from my list above. I don't see any 2147483649, 2147483650 or 2147483651 values in my logs, positive or negative, so I don't have anything to go on, there.

 

Hopefully this helps someone, or someone can take it from here and say something more convincing.  Rob

 


Robert Flum
FlumR@genrad.com
user posted image