Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 18th December 2001, 04:46   #1
cchian
Member
 
Join Date: Apr 2001
Posts: 73
Lightbulb 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 InstallDirI****y?

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
cchian is offline   Reply With Quote
Old 18th December 2001, 05:05   #2
DuaneJeffers
Major Dude
 
DuaneJeffers's Avatar
 
Join Date: May 2001
Location: Winter Park, FL
Posts: 1,776
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

Website

Yeah, that's pretty much it. :-\
DuaneJeffers is offline   Reply With Quote
Old 18th December 2001, 17:09   #3
cchian
Member
 
Join Date: Apr 2001
Posts: 73
Quote:
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
cchian is offline   Reply With Quote
Old 18th December 2001, 19:11   #4
justin
Moderator Alumni
 
Join Date: Apr 2000
Location: USA
Posts: 315
In .onInit you can call ReadINIStr $INSTDIR ...

-Justin
justin is offline   Reply With Quote
Old 18th December 2001, 21:32   #5
cchian
Member
 
Join Date: Apr 2001
Posts: 73
Quote:
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
cchian is offline   Reply With Quote
Old 19th December 2001, 02:09   #6
DuaneJeffers
Major Dude
 
DuaneJeffers's Avatar
 
Join Date: May 2001
Location: Winter Park, FL
Posts: 1,776
Would it install correctly??? If so, then just use the:

Quote:
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

Website

Yeah, that's pretty much it. :-\
DuaneJeffers is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump