QRYPUBAPP is a command-line tool for Citrix Servers to check whether the current session is running a specified Published Application. This utility was written for the purpose of allowing one login script to process specific commands for individual published applications. This utility is FREEWARE and was written by Warren Simondson of Ctrl-Alt-Del IT Consultancy, Australia. www.ctrl-alt-del.com.au Thankyou to the CITRIX SDK available from www.citrix.com/cdn Usage: QRYPUBAPP [pubappname] pubappname - identifies the published application name (Not case sensitive. Published App cannot contain spaces.) The ERRORLEVEL return code shows if the current session is running the specified Published Application. Example Script: usrlogon.cmd ------------ @ECHO OFF :stage1 QRYPUBAPP mypubapp1 IF ERRORLEVEL 1 goto stage2 rem successfully matched echo This is the correct published app. echo put other commands here for this app. goto end :stage2 QRYPUBAPP mypubapp2 IF ERRORLEVEL 1 goto end rem successfully matched echo This is the correct published app. echo put other commands here for this app. :end echo put general logon commands here The freeware version is offered AS IS. Ctrl-Alt-Del IT Consultancy has made every effort possible to ensure that QRYPUBAPP is free of any bugs or errors, however in no way is QRYPUBAPP to be considered error or bug free. You assume all responsibility for any damages or lost data that may result from any errors or bugs in QRYPUBAPP. IN NO EVENT WILL Ctrl-Alt-Del IT Consultancy BE LIABLE TO YOU FOR ANY GENERAL, SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR OTHER DAMAGES ARISING OUT OF THIS PRODUCT.