View Single Post
  #18  
Old 27-12-2017, 14:22
Mini Mini is offline
Registered User
 
Join Date: Nov 2013
Location: -
Posts: 125
Thanks: 171
Thanked 76 Times in 43 Posts
Mini is on a distinguished road
[Setup]
AppName=My Program
AppVerName=My Program v 1.7
DefaultDirName={pf}\My Program
OutputBaseFilename=example
OutputDir=.

[Languages]
Name: russian; MessagesFile: compiler:Languages\Russian.isl

[Code]
type
TSystemInfo = record
wProcessorArchitecture: Word;
wReserved: Word;
dwPageSize: DWORD;
lpMinimumApplicationAddress: Integer;
lpMaximumApplicationAddress: Integer;
dwActiveProcessorMask: DWORD;
dwNumberOfProcessors: DWORD;
dwProcessorType: DWORD;
dwAllocationGranularity: DWORD;
wProcessorLevel: Integer;
wProcessorRevision: Word;
end;

procedure GetSystemInfo(var lpSystemInfo: TSystemInfo); external '[email protected] stdcall';

procedure InitializeWizard();
var
SysInfo: TSystemInfo;
Threads: Integer;
begin
GetSystemInfo(SysInfo);
Threads:= SysInfo.dwNumberOfProcessors;

SetIniString('Afr', 'Threads', IntToStr(Threads), ExpandConstant('{tmp}\cls.ini'));
end;
Reply With Quote
The Following 3 Users Say Thank You to Mini For This Useful Post:
Abbat (18-08-2020), doofoo24 (27-12-2017), Simorq (27-12-2017)