[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application
OutputDir=.
[code]
var
S,VKName,VKName1: String;
function AMD: Boolean;
begin
if RegQueryStringValue(HKLM,'SYSTEM\ControlSet001\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}\0000\Settings','Device Description',VKName) then
if RegQueryStringValue(HKLM,'SYSTEM\ControlSet001\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}\0003\Settings','Device Description',VKName1) then
S:= VKName1+' + '+VKName;
Result:= Pos('AMD',S)>0;
end;
function NVIDIA: Boolean;
begin
if RegQueryStringValue(HKLM,'SYSTEM\ControlSet001\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}\0000\Settings','Device Description',VKName) then
if RegQueryStringValue(HKLM,'SYSTEM\ControlSet001\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}\0003\Settings','Device Description',VKName1) then
S:= VKName1+' + '+VKName;
Result:= Pos('NVIDIA',S)>0;
end;
function VCardAMD: Boolean;
begin
if RegQueryStringValue(HKLM,'SYSTEM\ControlSet001\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}\0000\Settings','Device Description',VKName) then
S:= VKName;
Result:= Pos('AMD',S)>0;
end;
function VCardNVIDIA: Boolean;
begin
if RegQueryStringValue(HKLM,'SYSTEM\ControlSet001\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}\0000\Settings','Device Description',VKName) then
S:= VKName;
Result:= Pos('NVIDIA',S)>0;
end;
function InitializeSetup: Boolean;
begin
if (AMD and IsWin64) then
MsgBox(S+#13#10+'Система: x64',mbInformation, mb_Ok) else
if (AMD and not IsWin64) then
MsgBox(S+#13#10+'Система: x86',mbInformation, mb_Ok) else
if (NVIDIA and IsWin64) then
MsgBox(S+#13#10+'Система: x64',mbInformation, mb_Ok) else
if (NVIDIA and not IsWin64) then
MsgBox(S+#13#10+'Система: x86',mbInformation, mb_Ok) else
if (VCardAMD and IsWin64) then
MsgBox(S+#13#10+'Система: x64',mbInformation, mb_Ok) else
if (VCardAMD and not IsWin64) then
MsgBox(S+#13#10+'Система: x86',mbInformation, mb_Ok) else
if (VCardNVIDIA and IsWin64) then
MsgBox(S+#13#10+'Система: x64',mbInformation, mb_Ok) else
if (VCardNVIDIA and not IsWin64) then
MsgBox(S+#13#10+'Система: x86',mbInformation, mb_Ok) else
if not (AMD and NVIDIA and VCardAMD and VCardNVIDIA) then
MsgBox(VKName+#13#10+'Видеокарта не поддерживается',mbInformation, mb_Ok)
Result:= false;
end;