Solved

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

Posted on 2012-03-20
1
836 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
Comment Utility
I think I got it.

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

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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Today companies are subjected to more-and-more data, and it won't stop any time soon.  But there are obvious opportunities for reducing data, particularly data duplicated among companies.
This is about my first experience with programming Arduino.
The viewer will learn how to create multiple layers to apply various filters and how to delete areas from each layer’s filter.
Viewers will learn how to use the Hootsuite Dashboard.

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now