Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   How to download a file from the Internet without the use of plug-ins ?? (http://forums.winamp.com/showthread.php?t=372089)

stass 27th September 2013 14:01

How to download a file from the Internet without the use of plug-ins ??
 
How to download a file from the Internet without the use of plug-ins ?
Is it possible to use this function URLDownloadToFile () ? How to do it?

Anders 27th September 2013 14:50

You need the system plugin to call Windows functions...

stass 28th September 2013 06:41

Try this:
Quote:

OutFile "URLDownloadToFile_test.exe"
; http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx
Section
StrCpy $1 "http://rarlab.com/rar/wrar500.exe"
StrCpy $2 "C:\Downloads\wrar500.exe"
System::Call 'urlmon.dll::URLDownloadToFile(i0,i$1,i$2, i0, i0)'
SectionEnd
But it is not working ... Please tell me how to solve the problem.

Anders 29th September 2013 02:23

You wanted to do it without plugins and then you post some code where you are using a plugin!

Why not use one of the downloader plugins?

stass 30th September 2013 05:13

Anders
I am interested - how to use the function URLDownloadToFile.
Is it so difficult to help ?..

Anders 30th September 2013 16:20

What is wrong with nsisDL and InetC?

stass 1st October 2013 05:09

https://www.virustotal.com/ru/file/5...e4e8/analysis/

WS.Reputation.1 | Symantec

I understand - triggering false. But you can not work ....

On nsisdl.dll not find any working links ...

MSG 1st October 2013 07:26

NSIDdl is shipped with NSIS. If you did a full install, you already have it.

Anders 1st October 2013 18:22

INetC is no longer detected by Symantec and I submitted a false positive to TrendMicro, the problem should go away soon...

Quote:

StrCpy $1 "http://o.aolcdn.com/os/winamp/forums/images/buttons/reply.gif"
StrCpy $2 "$temp\reply.gif"
System::Call 'urlmon::URLDownloadToFile(i0,tr1,tr2, i0, i0)i.r0'
DetailPrint HRESULT=$0 ; 0 means success (probably), read MSDN for more info

stass 2nd October 2013 04:59

Anders
Thank you very much!

AjitPS 5th February 2014 16:41

Hello,
I am new to using the NSIS installer.
My NSIS script creates the installer without any issues but a software download that it tries to do via the nsisdl plugin fails. This happens at the beginning of the installation process. The rest of the process works fine. I can download this external software (.exe) via the URL if I use it in my web browser but not within the NSIS installer.

I use the statement:
Quote:

nsisdl::download url "${INSTALL_EXE_NAME}"
This was working until 2 days ago but keeps failing now. I tried replacing the plugin with the inetc plugin but even that does not work.

This is a repeat post because I need an answer to this soon. If anyone has information about the proper syntax for using the nsisdl plugin or has experienced this before while attempting to download from a url, please do let me know.
Thanks.

Anders 5th February 2014 19:56

There is no url there, just the string "url"...


Next time don't ask the same question in several threads, it is very rude.

AjitPS 6th February 2014 16:43

Re: Using nsisdl to download from url
 
Hello,
First of all, sorry for posting the question in multiple places. Won't happen again.

Secondly, the code I showed in my earlier post was an example. My actual script has a valid url (where the string "url" is shown in the earlier example) and the $INSTALL_EXE_NAME is the name of the location where to put it (the .exe).

Some part of the script is shown below:

Quote:

# default section
Section "Installer Section"

setShellVarContext current

; ** Ask the user if they want to install the package **
MessageBox MB_YESNO "In order for this code to work, the following needs to be downloaded. Choose Yes or No. " IDYES true IDNO false
true:
; Download the package
nsisdl::download http://exampleURL/exampleApp1-win.exe "${INSTALL_EXE_NAME}"

Pop $R0
StrCmp $R0 "success" +3
MessageBox MB_OK "Download Failed - Please install it manually"
Goto next
However, the software download fails immediately. The url above is again a generic example. Downloading from the actual URL (in my script) works perfectly if I go to the URL in my browser. However, it is no longer working in NSIS. It used to work until 3 days ago since when it keeps failing. I also tried to use the inetc plugin instead of nsisdl but that failed too.

Kindly let me know what you think.
Thanks.

Anders 6th February 2014 18:15

Do you have AntiVirus installed?

AjitPS 7th February 2014 08:25

Hi Anders,
Yes, I have Norton AntiVirus installed. However, the installation from the url used to work without problems (with the AntiVirus) until 4 days ago.
Now, it fails immediately after clicking "Yes" to the installation, shown in the script I mentioned above.

Afrow UK 10th February 2014 08:03

What is the value of ${INSTALL_EXE_NAME}?

What error does inetc report (check the value on the stack)?

Stu

zedzedbeta5 20th February 2014 16:07

For the OS's that support it:

nsExec::ExecToStack `"powershell.exe" -inputformat none -Command "$wc=New-Object system.Net.WebClient;$wc.downloadFile('http://someurl.com/file.exe','$INSTDIR\file.exe')"`

Use the plugins, they work well.


All times are GMT. The time now is 17:21.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.