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?
How to download a file from the Internet without the use of plug-ins ??
17 posts
You need the system plugin to call Windows functions...
Try this:
OutFile "URLDownloadToFile_test.exe"But it is not working ... Please tell me how to solve the problem.
; 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
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?
Why not use one of the downloader plugins?
Anders
I am interested - how to use the function URLDownloadToFile.
Is it so difficult to help ?..
I am interested - how to use the function URLDownloadToFile.
Is it so difficult to help ?..
What is wrong with nsisDL and InetC?
NSIDdl is shipped with NSIS. If you did a full install, you already have it.
INetC is no longer detected by Symantec and I submitted a false positive to TrendMicro, the problem should go away soon...
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
Anders
Thank you very much!
Thank you very much!
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:
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.
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:
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.
There is no url there, just the string "url"...
Next time don't ask the same question in several threads, it is very rude.
Next time don't ask the same question in several threads, it is very rude.
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:
Kindly let me know what you think.
Thanks.
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:
# default sectionHowever, 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.
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
Kindly let me know what you think.
Thanks.
Do you have AntiVirus installed?
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.
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.
What is the value of ${INSTALL_EXE_NAME}?
What error does inetc report (check the value on the stack)?
Stu
What error does inetc report (check the value on the stack)?
Stu
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.
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.