0

I have made an installer for my program with Inno Setup and it has been worked fine so far, but it gives error in one system : (The system is Win7-64 bit)

SWbemServicesEx: Generic failure

The code is :

WbemLocator := CreateOleObject('WbemScripting.SWbemLocator');
WbemServices := WbemLocator.ConnectServer('.', 'root\CIMV2');
QueryGPU := 'SELECT * FROM  Win32_VideoController';
WbemObjectSet := WbemServices.ExecQuery(QueryGPU);
if not VarIsNull(WbemObjectSet) then
begin
  NetworkAdapter := WbemObjectSet.ItemIndex(0);
  uuG :=  NetworkAdapter.PNPDeviceID;
end;
  • The error occurs at this line:

WbemObjectSet := WbemServices.ExecQuery(QueryGPU);

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
  • Try creating a log file for your installer, and see when it encounters an error. Or you will run the installer script from inno setup installed on win7 64bit and it will run the code with error checking. – yonni May 22 '22 at 17:30

1 Answers1

0

The problem has been resolved after removing Graphic driver. I think graphic driver didn't allow to run query.