Commit 4c1d5efdf78da3146282d99b021c51a261ccdf06

Authored by Adriano Vieira
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,20 +722,39 @@ begin
722 Begin 722 Begin
723 v_SMBIOS := TMiTeC_SMBIOS.Create(nil); 723 v_SMBIOS := TMiTeC_SMBIOS.Create(nil);
724 v_SMBIOS.RefreshData; 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 if (v_te_mem_ram_desc <> '') then 734 if (v_te_mem_ram_desc <> '') then
731 v_te_mem_ram_desc := v_te_mem_ram_desc + ' - '; 735 v_te_mem_ram_desc := v_te_mem_ram_desc + ' - ';
  736 +
732 v_te_mem_ram_desc := v_te_mem_ram_desc + 'Slot '+ inttostr(i) + ': ' 737 v_te_mem_ram_desc := v_te_mem_ram_desc + 'Slot '+ inttostr(i) + ': '
733 + v_SMBIOS.MemoryDevice[i].Manufacturer + ' ' 738 + v_SMBIOS.MemoryDevice[i].Manufacturer + ' '
734 - + inttostr(v_SMBIOS.MemoryModule[i].Size) + 'Mb ' 739 + + inttostr(v_SMBIOS.MemoryDevice[i].Size) + 'Mb '
735 + '(' + v_te_mem_ram_tipo +')'; 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 if (trim(v_te_placa_mae_fabricante)='') then begin 759 if (trim(v_te_placa_mae_fabricante)='') then begin
741 v_te_placa_mae_fabricante := v_SMBIOS.MainBoardManufacturer; 760 v_te_placa_mae_fabricante := v_SMBIOS.MainBoardManufacturer;
frmConfiguracoes.pas
@@ -91,7 +91,7 @@ begin @@ -91,7 +91,7 @@ begin
91 EditEnderecoServidorUpdates.Text := FormularioGeral.GetValorDatMemoria('Configs.TE_SERV_UPDATES',v_tstrCipherOpened); 91 EditEnderecoServidorUpdates.Text := FormularioGeral.GetValorDatMemoria('Configs.TE_SERV_UPDATES',v_tstrCipherOpened);
92 v_ID_SO := trim(FormularioGeral.GetValorDatMemoria('Configs.ID_SO',v_tstrCipherOpened)); 92 v_ID_SO := trim(FormularioGeral.GetValorDatMemoria('Configs.ID_SO',v_tstrCipherOpened));
93 Btn_Desinstalar.Visible := FALSE; 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 begin 95 begin
96 //Se for Win9x/ME 96 //Se for Win9x/ME
97 Btn_Desinstalar.Visible := TRUE; 97 Btn_Desinstalar.Visible := TRUE;