Old 28th May 2010, 18:20   #1
craigkornacki
Junior Member
 
Join Date: May 2010
Posts: 1
Newbie: How to Use NSExec

I would like to create an installer package that runs a DOS batch file. I have tried using NSExec, but I get an error message.

This is what the script looks like:

nsExec::Exec [/OEM] '"C:\CRXIWIN7.bat"'

Note: The batch file exists in this location.

When I compile the script, I get the message :

Processing script file: "C:\crystal.txt"
Error: Can't add entry, no section or function is open!
Error in script "C:\crystal.txt" on line 1 -- aborting creation process

Is my syntax correct?

If my syntax is correct, do I need to do something to make NSExec work?

I am working on a Windows 7 PC.

Thanks very much for your help.

Craig
craigkornacki is offline   Reply With Quote
Old 28th May 2010, 18:28   #2
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
You are apparently not yet versed in the basics of the NSIS scripting language. I would suggest you study NSIS\Examples\Example1.nsi and Example2.nsi for a starter's look at how NSIS works. When you fully understand what ever command in those files do exactly, you'll be ready to try building your own installer. Use the command reference to look up command functions:
http://nsis.sourceforge.net/Docs/Chapter4.html

Also: a parameter between brackets, such as [/OEM], means that it's optional. You can add the /OEM parameter, or you can leave it out, depending on what behaviour you want. But you shouldn't keep the [] brackets, in any case.
MSG 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