Archive: InstallDirRegKey equivalent for ini files


InstallDirRegKey equivalent for ini files
Is it possible to have an equivalent to InstallDirRegKey that reads its value from an ini file? Maybe it could be called InstallDirIniKey?

I make use of variables whenever possible and it would be great if I could read the default installation directory from an ini file.

-Carlos


But What If the User deletes the ini file??? The best thing about the registry is that only programmers and computer guys know about it.

-Duane


Originally posted by DuaneJeffers
But What If the User deletes the ini file??? The best thing about the registry is that only programmers and computer guys know about it.
That is true, but in this particular project, I wanted to import the default installation path from an ini file located in the installation media itself. I am using this to create an add-on utility to our installer which I don't create myself. Our developers keep the path information in ini files instead of the registry.
I still feel that this option could be helpful to some users.

-Carlos

In .onInit you can call ReadINIStr $INSTDIR ...

-Justin


Originally posted by justin
In .onInit you can call ReadINIStr $INSTDIR ...
I did try that route before posting my original question. I think the problem I had using .onInit was that once you selected a different drive using the Browse button, the default directory would somehow just blank out.

-Carlos

Would it install correctly??? If so, then just use the:

From NSIS Documentation
DirShow | show|hide
Just hide it, only if the ReadINIStr worked properly.

That, or just tell your developers to use NSIS and tell them the registry code.

-Duane