?
Solved

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

Posted on 2012-03-20
1
Medium Priority
?
872 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

In this post we will learn different types of Android Layout and some basics of an Android App.
There are many software programs on offer that will claim to magically speed up your computer. The best advice I can give you is to avoid them like the plague, because they will often cause far more problems than they solve. Try some of these "do it…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Starting up a Project

762 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