Page 1 of 1

DOWNLOAD FILE

Posted: Fri Nov 23, 2012 5:39 am
by Senthil
As I am getting an error message when i am downloading file from the localhost. i am using IIS7. Please help me in this regard.

This is my MSI Code....

Set Variable RESULT to
Set Variable TARGETLOC to D:\IA\TEST2
Download File http://localhost/MYDAPP/SAMPLE.TXT into $TARGETLOC$ (get result into variable RESULT)
MessageBox: D- RESULT, $RESULT$
if Variable RESULT Equals SUCCESS
MessageBox: RESULT=, SUCCESS
else
MessageBox: RESULT: =, FAILED
end


Thanks in advance
Senthil

Re: DOWNLOAD FILE

Posted: Fri Nov 23, 2012 8:47 am
by FrancescoT
Dear Senthil,

if you type " http://localhost/MYDAPP/SAMPLE.TXT" in your browser are you able to download the file?

Regards

Re: DOWNLOAD FILE

Posted: Mon Nov 26, 2012 12:26 am
by Senthil
Yes, getting reply in the browser when i am giving this URL " http://localhost/MYDAPP/SAMPLE.TXT"

Re: DOWNLOAD FILE

Posted: Mon Nov 26, 2012 9:58 am
by FrancescoT
Dear Senthil,

Honestly, I just tried to download a file over my network and works fine.

In order to to do an extra verification, have you tried to replace your file URL with something else available over internet?

Regards

Re: DOWNLOAD FILE

Posted: Wed Dec 05, 2012 4:29 am
by mikKummerfeld
Hello guys,

I have the following problem while downloading files from our server. In the top of the script it works perfectly,
but when I want to download the files within my script (where the installfiles commands are) it fails.

Do you have an idea?

Code: Select all

[DEFINE WEB MEDIA MIK.arjuna]
   Get Component MIK.arjuna Selection State into Variable SELECTED
   if Variable SELECTED Equals TRUE
     Download File http://www.mik-support.de/setups/arjuna/files/MikArjuna2501.7z into $TARGETDIRLOC$\MikArjuna2501.7z (get result into variable downloadstate)
     Extract .... into TARGETDIR
   end

Re: DOWNLOAD FILE

Posted: Wed Dec 05, 2012 10:09 am
by FrancescoT
Dear Heiko,

Without having your complete project it is not easy to give you a correct answer ... but this could be caused because your Downolad command it is located within a WEB MEDIA BLOCK definition.

Please try to verify what happens moving the Download command just before that WEB MEDIA BLOCK and anyway, outside of any other existing WEB MEDIA BLOCK.

Regards

Re: DOWNLOAD FILE

Posted: Fri Dec 07, 2012 8:30 am
by mikKummerfeld
I can confirm that it does not work within web media block, but outside of that.
Thanks

Re: DOWNLOAD FILE

Posted: Fri Dec 07, 2012 9:19 am
by FrancescoT
Happy you solved!

Regards

Re: DOWNLOAD FILE

Posted: Fri Jan 25, 2013 11:20 am
by mikKummerfeld
try this one Senthil:

Code: Select all

~InstallAware Clipboard Data~
~MessageBox~
~{DEB2084F-583F-433E-84DE-D12E54275377}~
~newresult~
~$newresult$~
~0~
~1~
~~
~Call DLL Function~
~{2360D2D1-F71C-4912-803F-8A6C8815543F}~
~Urlmon.dll,URLDownloadToFileA,long,newresult,long,0,"pointer to string",http://www.domain.de/file.txt,"pointer to string",$TARGETDIR$,long,0,long,0,$~
~mIDEFunc.dll\mEXEFunc.dll~
~Set Variable~
~{4EF1EE3D-BCAA-4A2A-9F8A-4DB45CC3838F}~
~newresult$MYAH$MYAH$FALSE~
~~

Re: DOWNLOAD FILE

Posted: Mon May 21, 2018 7:23 am
by SteveDude
Glad you have it solved too. I'll mention this and it may save a headache or two later. depending on the server,.7ZIP is not always defined as a MIME type, so when I've had problems with it that's one of the first things check.