prefetch

The prefetch command allows a file to be downloaded before the action begins. You do not need a matching continue if statement for the file to be downloaded and checked in advance. The prefetch command is preferred over the download command.

For instance, consider the command:

prefetch a.exe sha1:0123456789012345678901234567890123456789 
   sha256:0a1b2345678901234567g8901j234e5678g90y12r3456789345678923167e3se
   size:11723 http://x/z.exe 

The action example above prefetches the z.exe file from the specified site and automatically saves it in the local __Download folder as a.exe.

Syntax

prefetch <name> sha1:<value> size:<value> sha256:<value> <url> 

Where name is a simple filename, without special characters or path delimiters. If the name violates any of the following rules, the prefetch command will fail:

Name must be 32 characters or less.

Name must only be composed of ASCII characters a-z, A-Z, 0-9, -, _, and non-leading periods.

Here sha1:value or sha256:value represent the secure hash algorithm value, size:value represents the size of the file in bytes and url represents the location of the site, including the filename.

Example

prefetch patch3 sha1:92c643875dda80022b3ce3f1ad580f62704b754f 
  size:813160 http://www.download.windowsupdate.com/msdownload
  /update/v3-19990518/cabpool/ 
   q307869_f323efa52f460ea1e5f4201b011c071ea5b95110.exe 

This line of code prefetches the given file from the specified folder on the web site, directs the downloaded file to the action site "__Download" folder and renames it to patch3.

if {name of operating system = "WinXP"} 
   prefetch patch.exe sha1:92c643875dda80022b3ce3f1ad580f62704b754f 
    size:813160 http://www.download.windowsupdate.com/msdownload
     /update/v3-19990518/cabpool/
      q307869_f323efa52f460ea1e5f4201b011c071ea5b95110.exe

else
   prefetch patch.exe sha1:c964d4fd345b6e5fd73c2235ec75079b34e9b3d2 
    size:845416 http://www.download.windowsupdate.com/msdownload
     /update/ v3-19990518/cabpool/
      q310507_2f3c5854999b7c58272a661d30743abca15caf5c.exe

endif
utility __Download\patch.exe
wait __Download\patch.exe

This code prefetches a file based on the operating system, saves the file to the utility cache as patch.exe and waits for its completion to continue the action.

Note: Relevance substitution is NOT performed on the prefetch 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 the IBM BigFix to prefetch downloads through a relay hierarchy to the clients.

Version 6.0 and above -- Windows Only