Free script to preload all App-V applications

With the release of Microsoft App-V 4.5, the requirements to have a full App-V infrastructure disappeared. Certainly, you can still deploy a full App-V infrastructure (database, management console, and web server), but it isn’t a requirement anymore. With App-V 4.5, you have to option to stream sequenced applications to a client directly (standalone or streaming only mode). However, you lose a piece of functionality called “pre-loading applications” when doing this because the App-V client is not configured to connect to an App-V server for delivery. Using a full delivery infrastructure, you could issue the sfttray.exe /loadall command to pre-load applications. Wilco van Bragt wrote a cool script to give you this functionality back in standalone mode.


@ECHO OFF

GOTO :START

************************************************************************************
** Script                 : PreloadAppV.cmd
** Author              : Wilco van Bragt
** Creation Date : 23-04-2010
** Usage               : Preload all applications based on available OSD files
** 
************************************************************************************
** Date                        Version      Scripter                Changes
** -------------------------------------------------------------------------------------
** 11:20 23-04-2010       0.1          WvB                      Initial version
**
**********************************************************************************
:START

:: --------------------------------------------------------------------------------------
::             Defining variables
:: --------------------------------------------------------------------------------------

setlocal enabledelayedexpansion

set /a counter=0

SET CONTENTLOCATION=\\<<SERVER>>\<<contentshare>>

:: --------------------------------------------------------------------------------------
::             Determine all available OSD and store those in a textfile
:: --------------------------------------------------------------------------------------

IF EXIST D:\OSDFILES.TXT DEL D:\OSDFILES.TXT

DIR %CONTENTLOCATION%\*.osd /s /b >>d:\OSDFILES.TXT

:: --------------------------------------------------------------------------------------
::             Read all the OSD files out of the text file and parse those to :STARTPRELOAD
:: --------------------------------------------------------------------------------------

FOR /F "delims= tokens=1" %%i in (D:\OSDFILES.TXT) do call :STARTPRELOAD %%i

del D:\osdfiles.txt

GOTO :EXIT

:: --------------------------------------------------------------------------------------
::             Preload the OSD files in bundles of five and wait 20 seconds for the next group
:: --------------------------------------------------------------------------------------

 :STARTPRELOAD

                SET OSDPRELOAD=%1

                set /a counter+=1

                START sfttray /quiet /load "%OSDPRELOAD%"

                 IF %COUNTER%==5 PING localhost -n 20&SET COUNTER==0

                 GOTO :EOF

 :EXIT

Continue at source…

Technorati : , , ,
Del.icio.us : , , ,

Leave a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top