Solved

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

Posted on 2012-03-20
1
844 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
What is Ransomware? 16 68
Isolate Drive C without physically disconnecting other hard drives 7 36
Map software access 4 30
parsing JSON help 1 9
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.
Healthcare organizations in the United States must adhere to the guidance of both the HIPAA (Health Insurance Portability and Accountability Act) and HITECH (Health Information Technology for Economic and Clinical Health Act) for securing and protec…
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…
An overview on how to enroll an hourly employee into the employee database and how to give them access into the clock in terminal.

773 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