Old 10th December 2004, 13:24   #1
manyoka
Junior Member
 
Join Date: Dec 2004
Location: Jo-burg.South Africa
Posts: 14
Arrow If Statements

Hi everybody.First I would just like to thank everyone for all there help,Now I need help with something else.

My installer installs MSDE,but what if the user already has MSDE installed,so then I created a dialog for the user to input his sa password so that I can attach the database which works great.But what about the users that dont have MSDE installed, you see if they dont have it installed then I dont want them to see the input dialog.So I need some sort of an if statement,so that if they dont have MSDE then the istaller will use the default password and not show the Input dialog.
Anyone that has some code or something please try and help me.
Thanx so much
manyoka is offline   Reply With Quote
Old 10th December 2004, 13:36   #2
RobGrant
Senior Member
 
Join Date: Sep 2004
Location: Nottingham
Posts: 263
Er sorry, is your question simply: how do I make an if statement?

2 good ways:
1) Create a variable e.g. Var MSDEInstalled
2) If they have MSDE installed, do StrCpy $MSDEInstalled "true"
3) if they do not, do StrCpy $MSDEInstaled "false"

Then when you come to decide whether they need the dialog or not, do:

code:

StrCmp $MSDEInstalled "true" 0 noMSDE
; Show Dialog
Goto end

noMSDE:
; install MSDE


end:
; stuff that you'd do afterwards if they had it installed or not



OR use the LogicLib plugin that comes with NSIS, that has some form of if statement.
RobGrant is offline   Reply With Quote
Old 10th December 2004, 13:42   #3
manyoka
Junior Member
 
Join Date: Dec 2004
Location: Jo-burg.South Africa
Posts: 14
If Statements

That is basically what I want to do.
Thanx I will try that.
manyoka is offline   Reply With Quote
Old 10th December 2004, 14:13   #4
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
http://nsis.sourceforge.net/index.ph...&tx_faq_faq=25
Joost Verburg is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast 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