Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 16th August 2007, 12:38   #1
123mobile
Junior Member
 
Join Date: Jul 2007
Posts: 17
Question Problem with getting command line parameters

Hi,

I have this problem which might be very simple.

I want to do something like this:

makensis myscript.nsi param1 param2

ie while compiling my nsis script I want it to get some parameters. I am facing two problmes while running:

1. 'makensis' is not recognized as an internal or external command, operable program or batch file.

2. I am not getting param1 and param2 at compile time.

I am searching for a long time on this forum, but could not find the answers.

Prabhat.
123mobile is offline   Reply With Quote
Old 16th August 2007, 13:17   #2
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
Open a command window within nsis directory and execute makensis /? to get all available parameters.

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 16th August 2007, 13:54   #3
123mobile
Junior Member
 
Join Date: Jul 2007
Posts: 17
Hi,

I understand your point and I did exactly that. But the real problem is to find a way to give parameters to the nsis file at compile time(ie before I get my exe file). Is it possible?
123mobile is offline   Reply With Quote
Old 16th August 2007, 14:16   #4
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
Isn't obvious that only available-acceptable parameters can get passed?

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 16th August 2007, 14:39   #5
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
Use /DPARAMS="my params" and use the define PARAMS in your script.

Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 16th August 2007, 15:10   #6
123mobile
Junior Member
 
Join Date: Jul 2007
Posts: 17
Lightbulb

I got it!!! Thanks to both of you.

Prabhat.
123mobile 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