How to import .reg file via Inno Setup

Viewed 227

I have a registry file (.reg) and I need to execute it while installing in silent. I don't want to use [Registry] section to add every registry key.

The registry key is in path:

C:\MyInstaller\bathkey.reg

Is it possible to import the registry file without adding each item to the [Registry] section?

1 Answers

Use reg import command:

[File]
Source: "C:\MyInstaller\bathkey.reg"; DestDir: "{tmp}"

[Run]
Filename: "reg"; Parameters: "import ""{tmp}\bathkey.reg"""
Related