Tamir Gefen
Tamir Gefen

Reputation: 1126

Couple of registry questions regarding Inno Setup

I'm setting a new app with Inno Setup, and I have some questions please:

I have to enter new values into Windows registry. I've tried this but it does not seem to work:

Root: HKLM; Subkey: "SYSTEM\Software\Atria\ClearCase\CurrentVersion\ContextMenus\MsExplorer\MenuTable\502"; ValueType: string; ValueName: "Text"; ValueData: "Test 1";

So I'd like to ask:

  1. Should I add a new entry just before, that creates "502" entry?

  2. Alternatively, I may use "regedit /s" to enter these values. What way is better when using Inno Setup?

  3. Besides, I'd like to ask the user during the installation, if he wants to add these values. I understand that I have to use [Tasks] entries, but still can't understand how to use it. Can you provide an example?

I have to support Win XP and Win7 (32 and 64bit), so if there is any differentiation, please let me know about.

Upvotes: 0

Views: 1119

Answers (1)

Deanna
Deanna

Reputation: 24253

You don't need to create the keys explicitly as that is done implicitly when you write the value. You should use the [registry] section as Inno can then remove the values on uninstall.

If this is installing on a 64-bit machine note that the entries will (by default) be written to the 32-bit view of the registry which you can see in regedit under: HKLM\Software\Wow6432Node\Atria\ClearCase\CurrentVersion\ContextMenus\MsExplorer\MenuTable\502
Microsoft KB896459 explains the changes in more details.

(Also note that HKLM/SYSTEM/Software is NOT the same as HKLM/Software with the latter being the usual one.)

You can also find samples of [tasks] in the help under [tasks].

Upvotes: 2

Related Questions