본문 바로가기

개발 관련

[inno setup] Visual C++ 2008 sp1 재배포 패키지 설치 확인하기

[inno setup] Visual C++ 2008 sp1 재배포 패키지 설치 확인하기


아래의 함수로 visual c++ 2008 sp1 redistributable package가 이미 설치되어 있는지 확인 할 수 있다.

'{9A25302D-30C0-39D9-BD6F-21E6EC160475}' 은 visual c++ 2008 sp1의 GUID 이다.


 RegKeyExists(HKEY_LOCAL_MACHINE,
    'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{9A25302D-30C0-39D9-BD6F-21E6EC160475}')


아래는 Inno Setup Help의 내용입니다.
Prototype:

function RegKeyExists(const RootKey: Integer; const SubKeyName: String): Boolean;

Description:

Returns True if the specified registry key exists.

Example:
begin
  if RegKeyExists(HKEY_CURRENT_USER, 'Software\Jordan Russell\Inno Setup') then
  begin
    // The key exists
  end;
end;