I would like to have the installer check for a .reg file located in the same folder as the installer executable, and if the installer sees the file, it would import the settings.
Unfortunately there seems to be no way to programmatically import .reg files. Is that correct? Did I miss it somewhere in the docs?
Instead I decided to do it like this:
Code: Select all
Set Variable REGFILENAME to
Find All Files in path $GPOPATHVAR$\Setup-MobilePBX.reg, write result into variable REGFILENAME
if Variable REGFILENAME not Equals
Run Program reg /import $REGFILENAME$
end
It doesn't seem to run the program, and the result variable from the Run Program command has the value 259.
The "reg" command is in the path on the test computer, and the "reg /import settings.reg" command works fine when executed manually.
The installation log contains the REGFILENAME variable with the correct filename and path, but I can't see anywhere where it tries to run the command.
How can I debug the problem to figure out why it doesn't run the program?
Or maybe there is a much better way for the customer to provide a settings file which the installer can import (without a lot of parsing INI files etc.)

