How to Force a Published Application to Start in Maximized Mode with Seamless Mode Enabled

How to Force a Published Application to Start in Maximized Mode with Seamless Mode Enabled

book

Article ID: CTX132434

calendar_today

Updated On:

Description

A user might want to have a specific published application always start on maximized mode. For example, Microsoft Internet Explorer.
This can be accomplished easily on the application properties, but only if seamless mode is disabled, as shown in the following screen shot:
User-added image
To force applications to start maximized without the need to disable seamless mode, you must publish a Visual Basic script that calls the application with maximized mode on as a startup switch.


Instructions

To force a published application to start in maximized mode, complete the following procedure:

  1. Create the following Visual Basic script by using Notepad:
    Set WshShell = WScript.CreateObject("WScript.Shell")
    WshShell.Run "iexplore.exe", 3, false

  1. Replace iexplore.exe with the full path for the desired application on the XenApp server, including the executable.

  1. Save this Visual Basic script with the correct file extension (.vbs) on a network share that is accessible from all XenApp servers where this application is or will be published.

  1. Publish the Visual Basic script as an “Application > Accessed from a server > installed application” with the following settings:
    Command line: %windir%\system32\wscript.exe \\networkshare\script.vbs (replace this address according to your environment and to your script filename.)
    Working directory: %windir%\system32\
    User-added image

Environment

The above mentioned sample code is provided to you as is with no representations, warranties or conditions of any kind. You may use, modify and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the sample code may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the sample code fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the sample code. In no event should the code be used to support ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SAMPLE CODE, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Although the copyright in the code belongs to Citrix, any distribution of the sample code should include only your own standard copyright attribution, and not that of Citrix. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the sample code.

Issue/Introduction

This document describes how to force a published application to start in maximized mode with seamless mode enabled.

Additional Information

You can also change the published Visual Basic script icon to match the actual application icon under Shortcut Presentation as shown in the following screen shot:

User-added image