IYIaster
30th April 2009 04:01 UTC
Need help with my first installer
I have a lot of files being installed some are batch files. My question is how do you run batch files in silent mode? Next question is I have a progress bar when it's installing everything but some of the files are like 150mb and it takes a long time. So, when its installing these large files the progress bar just sits there. So, the person installing might think it has froze. Is there a way to add a progress bar that shows the progress of each file? If so can you have a progress bar for the whole install and then maybe one under that for each file. With maybe a message saying whats being installed?
IYIaster
30th April 2009 18:35 UTC
Can someone please help?
Afrow UK
30th April 2009 19:10 UTC
Run batch files using ExecDos (or nsExec). There is no code in NSIS at present to display a secondary progress bar, but there are 2 plugins on the Wiki which you could try that allow you to control the progress bar (one of which I wrote myself but I haven't worked on in a VERY long time and there appears to be some bugs in it).
You should get more information on files (i.e. % extracted) if you use SetCompressor /solid lzma.
Stu
IYIaster
1st May 2009 07:37 UTC
Thanks for the help! I see what your saying about SetCompressor /solid
and it does show you a progress bar while its transferring the zip file from the install to the pc and it would work perfectly if it was not just moving the zip file but extracting the zip file to the right directory and had that % is there anyway to do that?
lewellyn
1st May 2009 15:43 UTC
I think Afrow UK was referring to his plugin listed on the wiki for manual progress bar control.
And if you want it taken care of "automagically", and aren't afraid of recompressing your zip files into "7-zip" format, take a look at the Nsis7z plugin, specifically Nsis7z::ExtractWithDetails. Although, honestly, at that point you're best off just letting NSIS install them to the right place, usually. After all, 1) it's what NSIS is made for; 2) 7-zip uses LZMA (and can do solid).
IYIaster
1st May 2009 16:01 UTC
Well, I would allow nsis to extract the files if I knew how. But, the directories that are being installed have 1000's of files so I would have to make a cmd for each file RIGHT? I hope not. If there was a way to just load a directory that would be great.
lewellyn
1st May 2009 16:18 UTC
Look at the fine manual. ;) In the Instructions section, find the File instruction. (Hint, it's gonna be in Chapter 4 of the manual...)
File /r "Z:\This is where my source files are\*.*"
Look for syntax like that. :)