Solved

How to check for registry value in Inno Setup?

Posted on 2007-04-04
1
2,231 Views
Last Modified: 2012-05-05
How do I check for a registry value in Inno Setup.  I want to check if the "REG_DWORD" of Windows Vista is a 1 or a 0.

 if  "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA" = 1 then begin
           Result := true;
end;
0
Comment
Question by:frankmorrison
1 Comment
 
LVL 18

Accepted Solution

by:
mirtheil earned 500 total points
ID: 18856874
Something like:

var
  EnableLUA: Cardinal;
begin
  if RegQueryDWordValue(HKEY_LOCAL_MACHINE, 'Software\Microsoft\Windows\CurrentVersion\Policies\System',
     'EnableLUA', EnableLUA) then
  begin
    // Successfully read the value
   if EnableLUA = 1then
    MsgBox('EnableLUA is 1',mbInformation, MB_OK);
  end;
end;
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Installations often have prerequisites, such as “Microsoft .Net framework is required for this product”. The usual implementation in MSI installations is system search for a particular registry setting representing the required prerequisite, followe…
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used.

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question