function CPUname: string;<br>var<br> Reg: TRegistry;<br>begin<br> CPUname := '';<br> Reg := TRegistry.Create;<br> try<br> Reg.RootKey := HKEY_LOCAL_MACHINE;<br> if Reg.OpenKey('/Hardware/Description/System/CentralProcessor/0', False) then<br> CPUname := Trim(Reg.ReadString('ProcessorNameString'));<br> finally<br> Reg.Free;<br> end;<br>end;<br><br>Vista下CPU类型的路径也是HKEY_LOCAL_MACHINE/Hardware/Description/System/CentralProcessor/0