Using Parameter Query to download a file

(imported topic written by rmustapha91)

I was trying to download a file by requesting the customer to type in the xml file URL and click ok. But the file will now download with this download command. Can somebody help me? thanks

action parameter query “FileLocation” with description “Please enter your xml file full qualified URL path” with default “http://…xml”

//download xml file but doesn’t work

download now {parameter “FileLocation” of action}

copy “__download{following the text of last “” of parameter “FileLocation” of action}” “c:\temp\new.xml”

(imported comment written by Lee Wei)

Ralph,

Download commands are actually executed and scanned before the ActionScript runs. Relevance substitution is not supported.

The following is an excerpt from the documentation.

“Relevance substitution is NOT performed on the download as action command lines. This is because these actions are scanned by other components that deliver the downloads and these other components run on different machines which do not share those client’s evaluation context. This restriction, however, allows BES to prefetch downloads through a relay hierarchy to the clients.”

Lee Wei

(imported comment written by MrFixit)

Lee,

The documentation for a “download now” in the action guide isn’t completely accurate. You can do relevance substitution for the URL and we have been doing so for quite some time.

The most important details about the “download now” is that the client does the downloading as a SYSTEM account and it bypasses the caching at both BES Server and Relays.

Prior to the dynamic download capability this really was our main mechanism for Fixlets that had very frequently changing payloads.

Ralph,

You should check to see if the xml file is downloadable via a browser at the destination. Often xml file are restricted for direct downloads and would need to be renamed or packaged.

-Gary

(imported comment written by rmustapha91)

I can download the xml file alright from the web browser but won’t work with my above script.

(imported comment written by MrFixit)

Your client log is where you need to look. You should have something like the follow in the log if it was successful.

At 10:30:50 -0700 - Our Fixlet Site (http://server.company.COM/cgi-bin/bfgather.exe/OurFixletSite)

Command succeeded download now {value “PackageSource” of key “HKLM\SOFTWARE\internal\packagesource” of the registry} (fixlet 5854)

Typically if it fails there is an issue with the relevance. The log will indicate that failure if that was the case.

(imported comment written by rmustapha91)

I will look into that. Thanks