Solved

create a registry entry under certain if condition using Inno setup?

Posted on 2012-03-20
1
847 Views
Last Modified: 2012-03-26
Hi,

I have a procedure in the Inno setup script.
If this condition is met, I want to create a registry entry.
How do I do that?

I know that by creating the registry section it creates them automatically.
ex)
[Registry]
Root: HKCU; Subkey: "Software\My Company"; Flags: uninsdeletekeyifempty
Root: HKCU; Subkey: "Software\My Company\My Program"; Flags: uninsdeletekey
Root: HKLM; Subkey: "Software\My Company"; Flags: uninsdeletekeyifempty


I have this  procedure call:
[Files]
Source: "..\xxxx\*"; DestDir: "{app}\Setup\xxxxx"; AfterInstall: AfterxxxInstall();Flags: ignoreversion deleteafterinstall

procedure AfterxxxInstall();
begin
if (hasRegEntry = true) then begin
\\create an reg entry    <====== I want to create a registry entry if this condition is met
end
end;
0
Comment
Question by:dkim18
1 Comment
 

Accepted Solution

by:
dkim18 earned 0 total points
ID: 37743522
I think I got it.

procedure AfterxxxInstall();
begin
if (hasRegEntry = true) then begin

RegWriteStringValue(HKEY_CLASSES_ROOT, 'CLSID\{xxxxxxxxxxxxxxxxx}','', '');
end
end;
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Sort GridView by ID Descending 1 17
Can't disable touch pad on Windows 10 computer 16 45
TimeZone, day light savings, Sql server, asp.net 6 37
FInd Image Control Gridview 3 19
Let’s list some of the technologies that enable smooth teleworking. 
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

808 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