The code below can used to detect windows system and more detail see Inno setup help about Windows version.
// Check if Windows 2000 and SP4 if Version.NTPlatform and (Version.Major = 5) and (Version.Minor = 0) and (Version.ServicePackMajor < 4) then begin SuppressibleMsgBox('Windows 2000 need to install Service Pack 4.', mbCriticalError, MB_OK, MB_OK); Result := False; Exit; end;
The code below can used to detect windows system and more detail see Inno setup help about Windows version.
回覆刪除// Check if Windows 2000 and SP4
if Version.NTPlatform and
(Version.Major = 5) and
(Version.Minor = 0) and
(Version.ServicePackMajor < 4) then
begin
SuppressibleMsgBox('Windows 2000 need to install Service Pack 4.',
mbCriticalError, MB_OK, MB_OK);
Result := False;
Exit;
end;
http://www.cnblogs.com/pyw0818/archive/2011/01/22/1941963.html
I need to add device driver before installing main application.
回覆刪除Just add exec function in InitializeSetup such as the code below.
function InitializeSetup(): Boolean;
begin
WorkingDir := ExpandConstant ('{tmp}');
ExtractTemporaryFile ('1.exe');
ExtractTemporaryFile ('2.exe');
ExtractTemporaryFile ('3.cmd');
Exec (ExpandConstant ('{tmp}\1.exe'), '', ExpandConstant ('{tmp}'), SW_Show, ewNoWait, ReturnCode);
Exec (ExpandConstant ('{tmp}\2.exe'), '', ExpandConstant ('{tmp}'), SW_Show, ewNoWait, ReturnCode);
Exec (ExpandConstant ('{cmd}'), '/C 3.cmd', ExpandConstant ('{tmp}'), SW_Show, ewWaitUntilTerminated, ReturnCode);
from http://bbs.hanzify.org/simple/?t59170.html