rapid7/metasploit-framework — comment on commit e204923966ecee6efb8aaf8e79df3e81e22a4913
File: modules/post/windows/recon/winlocalprv_esc.rb line 360
By mHarshal:

The purpose of execution of systeminfo command is not just to have particular edition of the operating system but it also collects the list of microsoft KBs applied to the OS(when OS is vista, win7, 2008, this version do not have KB list in registry). So if the OS is vista, win7 or 2008 it will get the list of KBs from the systeminfo command. (as seen on the line 396)