Commit 4c1d5efdf78da3146282d99b021c51a261ccdf06
1 parent
2964646d
Exists in
master
- merge de branch (2.4) agente-windows
revisão [log:cacic/branches/2.4@814:816 "[814:816]"] git-svn-id: http://svn.softwarepublico.gov.br/svn/cacic/cacic/trunk/agente-windows@817 fecfc0c7-e812-0410-ae72-849f08638ee7
Showing
2 changed files
with
29 additions
and
10 deletions
Show diff stats
col_hard/col_hard.dpr
... | ... | @@ -722,20 +722,39 @@ begin |
722 | 722 | Begin |
723 | 723 | v_SMBIOS := TMiTeC_SMBIOS.Create(nil); |
724 | 724 | v_SMBIOS.RefreshData; |
725 | - if v_SMBIOS.MemoryModuleCount > -1 then | |
726 | - Begin | |
727 | - for i:=0 to v_SMBIOS.MemoryModuleCount-1 do begin | |
728 | - if (v_SMBIOS.MemoryModule[i].Size <> 0) then begin | |
729 | - v_te_mem_ram_tipo := v_SMBIOS.GetMemoryTypeStr(v_SMBIOS.MemoryModule[i].Types); | |
725 | + with v_SMBIOS do begin | |
726 | + if v_SMBIOS.MemoryDeviceCount>0 then begin | |
727 | + for i:=0 to v_SMBIOS.MemoryDeviceCount-1 do | |
728 | + if (v_SMBIOS.MemoryDevice[i].Size>0) then begin | |
729 | + if v_SMBIOS.MemoryDevice[i].Device>smmdUnknown then | |
730 | + v_te_mem_ram_tipo:=MemoryDeviceTypes[v_SMBIOS.MemoryDevice[i].Device] | |
731 | + else | |
732 | + v_te_mem_ram_tipo:=MemoryFormFactors[v_SMBIOS.MemoryDevice[i].FormFactor]; | |
733 | + | |
730 | 734 | if (v_te_mem_ram_desc <> '') then |
731 | 735 | v_te_mem_ram_desc := v_te_mem_ram_desc + ' - '; |
736 | + | |
732 | 737 | v_te_mem_ram_desc := v_te_mem_ram_desc + 'Slot '+ inttostr(i) + ': ' |
733 | 738 | + v_SMBIOS.MemoryDevice[i].Manufacturer + ' ' |
734 | - + inttostr(v_SMBIOS.MemoryModule[i].Size) + 'Mb ' | |
739 | + + inttostr(v_SMBIOS.MemoryDevice[i].Size) + 'Mb ' | |
735 | 740 | + '(' + v_te_mem_ram_tipo +')'; |
736 | - end; | |
737 | - end; | |
738 | - end; | |
741 | + end; | |
742 | + end | |
743 | + else if v_SMBIOS.MemoryModuleCount > -1 then | |
744 | + Begin | |
745 | + for i:=0 to v_SMBIOS.MemoryModuleCount-1 do begin | |
746 | + if (v_SMBIOS.MemoryModule[i].Size <> 0) then begin | |
747 | + v_te_mem_ram_tipo := v_SMBIOS.GetMemoryTypeStr(v_SMBIOS.MemoryModule[i].Types); | |
748 | + if (v_te_mem_ram_desc <> '') then | |
749 | + v_te_mem_ram_desc := v_te_mem_ram_desc + ' - '; | |
750 | + v_te_mem_ram_desc := v_te_mem_ram_desc + 'Slot '+ inttostr(i) + ': ' | |
751 | + + v_SMBIOS.MemoryDevice[i].Manufacturer + ' ' | |
752 | + + inttostr(v_SMBIOS.MemoryModule[i].Size) + 'Mb ' | |
753 | + + '(' + v_te_mem_ram_tipo +')'; | |
754 | + end; | |
755 | + end; | |
756 | + end; | |
757 | + end; | |
739 | 758 | |
740 | 759 | if (trim(v_te_placa_mae_fabricante)='') then begin |
741 | 760 | v_te_placa_mae_fabricante := v_SMBIOS.MainBoardManufacturer; | ... | ... |
frmConfiguracoes.pas
... | ... | @@ -91,7 +91,7 @@ begin |
91 | 91 | EditEnderecoServidorUpdates.Text := FormularioGeral.GetValorDatMemoria('Configs.TE_SERV_UPDATES',v_tstrCipherOpened); |
92 | 92 | v_ID_SO := trim(FormularioGeral.GetValorDatMemoria('Configs.ID_SO',v_tstrCipherOpened)); |
93 | 93 | Btn_Desinstalar.Visible := FALSE; |
94 | - If (v_ID_SO <> '') and (StrToInt(v_ID_SO) in [1, 2, 3, 4, 5]) then | |
94 | + If (v_ID_SO <> '') and (g_oCacic.isWindows9xME()) then | |
95 | 95 | begin |
96 | 96 | //Se for Win9x/ME |
97 | 97 | Btn_Desinstalar.Visible := TRUE; | ... | ... |