Page 1 of 1

Download File returning blank value

Posted: Mon Sep 17, 2012 8:27 pm
by wesley
Hi again

I am having an issue with the updates process.

I had it working locally on my PC, where I could build a setup with the updates.ini file, place it in the IIS web directory, and the previous version of the application would find the new update, and allow me to download and install it.

Now I am trying to integrate the build process with our application under development, which is managed by TFS team build. Once I got the build working, and copied the files to a different web server (I created a clean setup with the correct updates.ini link to this remote server), I was getting the message "Unable to contact update server".

Code: Select all

Download File #UPDATE_SERVER# into $SUPPORTDIR$\updates.ini (get result into variable UPDATE_GET_INI)
So I added in some logging, using the Write To File and $LOGGED$ variable, and found the variable $UPDATE_GET_INI$ appears to be blank after the above line in the Updates script.
I am pretty sure its blank, because the text I write out in the same message is displayed, but there is no SUCCESS or ERROR value where there should be.

I created a separate IA project with the following 3 lines of code only, and set the #UPDATE_SERVER# compiler var to the same value, and I get a SUCCESS value from that. or an ERROR message when I change it to an incorrect link.

Code: Select all

Set Variable UPDATE_GET_INI to -1
Download File #UPDATE_SERVER# into $SUPPORTDIR$\updates.ini (get result into variable UPDATE_GET_INI)
MessageBox: download, Value: $UPDATE_GET_INI$$NEWLINE$$SUPPORTDIR$
Any ideas on why I am getting a blank return value from the Download File command?

Thanks
Wes

Re: Download File returning blank value

Posted: Tue Sep 18, 2012 7:52 am
by FrancescoT
Dear Wes,

as you can easly imagine, of course exist something ( ... probably an unwanted error causing the issue) and very often simple errors are really hard to find.

Is the variable declared UPDATE_GET_INI before of the use with "Download File" command?
Can you place a dialog just before:
"Download File #UPDATE_SERVER# into $SUPPORTDIR$\updates.ini (get result into variable UPDATE_GET_INI)"
in order to dispaly the value of compiler variable "UPDATE_SERVER"?

Let me know.

Regards

Re: Download File returning blank value

Posted: Tue Sep 18, 2012 5:20 pm
by wesley
Hi Francesco

I think I have fixed the problem for my build, but I have no idea what caused it still.
I ended up copy\pasting the code from the blank installaware project with the 3 lines to download a file which work, into my other project which has the original update.mia script distributed with Installaware.
Code I added to updates.mia that works:

Code: Select all

~InstallAware Clipboard Data~
~Download File~
~{C184863E-C7D3-447B-9ADB-4B170D588B01}~
~#UPDATE_SERVER#,$SUPPORTDIR$updates.ini,UPDATE_GET_INI,,,FALSE~
~mDown.dll\mDownExec.dll~
~Set Variable~
~{2923BF45-9029-4016-8A3A-985E16251895}~
~UPDATE_GET_INI$MYAH$MYAH$FALSE~
~~
Code that was in updates.mia that would not work:

Code: Select all

~InstallAware Clipboard Data~
~Download File~
~{21A7A414-2AB8-4AE1-A905-2DB9ED48A862}~
~#UPDATE_SERVER#,$SUPPORTDIR$\updates.ini,UPDATE_GET_INI,,,FALSE~
~mDown.dll\mDownExec.dll~
~Set Variable~
~{8746CDE1-4545-4495-8D8E-E67139A46D39}~
~UPDATE_GET_INI$MYAH$MYAH$FALSE~
~~
The only difference I could see is the GUID's are different, but they seem to link to the correct sections in the mia file, so I am not sure why one works and one doesn't.

Also, I finally figured out what half of the huge amount of whitespace at the end of the mia file is for :)

Thanks
Wes

Re: Download File returning blank value

Posted: Wed Sep 19, 2012 8:04 am
by FrancescoT
Dear Wes,

I'm happy that you solved ... but really strange what you found.

I will try to use the code you posted ... I'm really curious to see what happens.

Regards.