cchian
18th December 2001 05:46 UTC
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
DuaneJeffers
18th December 2001 06:05 UTC
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
cchian
18th December 2001 18:09 UTC
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
justin
18th December 2001 20:11 UTC
In .onInit you can call ReadINIStr $INSTDIR ...
-Justin
cchian
18th December 2001 22:32 UTC
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
DuaneJeffers
19th December 2001 03:09 UTC
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