|
|
#1 |
|
Junior Member
Join Date: Feb 2009
Posts: 40
|
Select and download files from ftp folder
Hi ! I need to create one installer that connects to a ftp folder,gets a list of files there and then gives the option to download some of them.Is this possible with NSIS ?
Thanks ! |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Either write a plug-in to do it, call an existing DLL using the System plug-in or execute an existing command line executable (search Google for a DLL/EXE to use).
Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Feb 2009
Posts: 40
|
Thanks for the answer!
|
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Feb 2009
Posts: 40
|
For me it is hard to do that with NSIS,I don't know how to write plugin,I think i'll write a .NET app that will do the work,and I'll use it as an installer,the single problem is : there must be FRAMEWORK installed on the computer
|
|
|
|
|
|
#5 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Did you search for a DLL or command line FTP client for Windows? You can use either through NSIS.
Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#6 |
|
Senior Member
|
In present times Framework is installed on most machines.
If not then it is very easy to detect it, download and install using NSIS
Create cool looking Graphical Installers in NSIS: www.graphical-installer.com -see below I offer NSIS scripting, C/C++/C#/Delphi programming: www.unsigned-softworks.sk Develop NSIS projects directly in Visual Studio 2005-2012: www.unsigned-softworks.sk/visual-installer/ |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Feb 2009
Posts: 40
|
Hi ! I've searched for command line but I found lot of things:commercial,mounting ftp to drive,etc,not something clearly,I'll do as T.Slappy suggested,thanks !
|
|
|
|
|
|
#8 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,839
|
Err... Making your installer download and install .NET is not a better solution. For one thing, it requires a reboot. Second, it makes your installer much much more complex. Third, lots of people don't want to install .NET. Fourth, installation will take much longer.
There are plenty of free commandline-based FTP tools out there. http://www.ncftp.com/ncftp/ is my third google hit. |
|
|
|
|
|
#9 | |
|
Junior Member
Join Date: Feb 2009
Posts: 40
|
Thanks all of you'I don't want to annoy you,but for me the shortest road is the road I know,I tried ncftp but I couldn,'t connect to my ftp account with this tool,also I don't know how to add files into NSIS installer,it is too hard,i'll use .NET solution,thanks
Quote:
|
|
|
|
|
|
|
#10 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Actually a fresh .NET installation does not require a reboot. Regarding FTP, one tool that comes to mind is wget. It is free and there is a Windows port (Google it) and it supports FTP file/folder listings IIRC.
Edit: cURL is another one. Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#11 |
|
Junior Member
Join Date: Feb 2009
Posts: 40
|
Indeed wget works
PHP Code:
PHP Code:
Thanks ! |
|
|
|
|
|
#12 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,839
|
You'll probably have to download the file list and direct output to a file:
SetOutPath $PLUGINSDIR File ftpclient.exe nsExec::Exec `"$PLUGINSDIR\ftpclient.exe" -param1 -param2 -etc > "$PLUGINSDIR\filelist.txt"` And then parse that txt file using the macros listed in Appendix E of the manual: http://nsis.sourceforge.net/Docs/AppendixE.html You could output what you find to a listbox with checkboxes, or some similar control. Google finds http://forums.winamp.com/showthread.php?t=318260 , which links to http://nsis.sourceforge.net/EmbeddedLists_plug-in . You could of course also make a hundred hidden sections, then unhide & rename the sections after you get the filelist. One section for each file. Then you could just use the components page, instead of bothering with a checkbox'ed listbox control. |
|
|
|
|
|
#13 |
|
Junior Member
Join Date: Feb 2009
Posts: 40
|
Thanks MSG !!!
I've done,I've created sections (I have max 7 ) default hidden (name ="") and I show them after getting the file list,I used SectionSetText.... all works, but instead using wget to download the files that shows a command window I want to use something with a real progressbar so I tried Inetc plugin, but I can't download the file with it,also with wget I can,this is the command I use : PHP Code:
Thanks ! |
|
|
|
|
|
#14 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Put /end on the end of your inetc line.
Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#15 |
|
Junior Member
Join Date: Feb 2009
Posts: 40
|
|
|
|
|
|
|
#16 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Does it work without the /caption and /popup switches? If not then I would suspect your URL format is wrong as then I'd assume that error means InternetCrackUrl API failed.
Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#17 | |
|
Junior Member
Join Date: Feb 2009
Posts: 40
|
Hi !
I tried something like this, rename user to myuser not myuser@mywebserver.info user is defined in cpanel as myuser@mywebserver.info,tested also with browser,simple name myuser doesnt work So using simple myuser I can see the progressbar and then the message : Download Status:530:Login autenthication failed PHP Code:
Thanks! Quote:
|
|
|
|
|
|
|
#18 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
This worked for me:
You sure you put /end on correctly (as shown)?code: Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#19 |
|
Junior Member
Join Date: Feb 2009
Posts: 40
|
not working,I think there must be a bug when user is defined as
myuser@mywebserver.info not myuser Thanks |
|
|
|
|
|
#20 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
You can't have an @ in the username (or password). The FTP URI specification does not allow it.
It has to be: ftp://<user>:<pass>@<host>/<path> Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#21 |
|
Junior Member
Join Date: Feb 2009
Posts: 40
|
In wget I use it like this and it works :
PHP Code:
Thanks! |
|
|
|
|
|
#22 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
As I said it's the FTP URI specification that does not allow the @ in the username when the username is in the URI. The @ is used as the delimiter between the username and password therefore it cannot allow more than one. This is not a fault of the plug-in. Try it in IE (or any other browser) for example. The reason it works with wget is because you're not specifying the username in the FTP URI. If you are stuck with that username then you will have to use wget instead of inetc.
Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#23 |
|
Junior Member
Join Date: Feb 2009
Posts: 40
|
Thanks Afrow, I'll use wget.
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|