Solved

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

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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Skype is a P2P (Peer to Peer) instant messaging and VOIP (Voice over IP) service – as well as a whole lot more.
In this post we will learn different types of Android Layout and some basics of an Android App.
XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…
Progress

707 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