• View Communities
    • Citrix Developer Network
      The place for unfiltered straight talk on Citrix products. Blogs, code downloads, best practices, APIs, and more can all be found here.
    • Citrix Ready Community Verified
      Does it work with Citrix? Application compatibility questions are a thing of the past with the new Citrix Community Verified site.
    • Blogs
      Learn the latest from the Citrix employees who are building application delivery infrastructure technologies.
    • Blogosphere
      The Citrix Blogosphere is a window into the thousands of conversations taking place about Citrix and Application Delivery.
  •  Sign In
XenApp Developer Network

Disable an Application in a Citrix Farm

Description

The DisableApp tool allows you to disable an application in a farm.   

Script Version

1.0   

cdn:Download

How to Use DisableApp

To disable an application in a farm, issue the following command on the command prompt where the script resides:  

> DisableApp.wsf <ApplicationDisableName> 

Note: To enable an application, use the EnableApp tool. 

Code Snippet

Search through all applications in the farm to find the application. If the application exists, load the application object: 

app1.Initialize MetaframeWinAppObject,appDN

app1.loaddata(true)

Disable the application:

app1.EnableApp=0

 
Save the application: 

app1.savedata()

 


Disclaimer

These software applications are provided to you as is with no representations, warranties or conditions of any kind.  You may use 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 software application 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 software application 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 software application.  In no event should the code be used to support of 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 SOFTWARE APPLICATION, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.  You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the code.   

 

Tags

mfcom mfcom Delete
disable application disable application Delete
Enter tags to add to this page:
Please wait 
Looking for a tag? Just start typing.
  1. Jan 20, 2009

    Anonymous says:

    The script echo's my Farm Name correct, but gives the error "App Not found&...

    The script echo's my Farm Name correct, but gives the error "App Not found!".  I cannot seem to get the script to work on a Presentation Server 4.0 for W2K3 or W2K3x64.  Does anyone have suggestions?

    1. Feb 03, 2009

      Anonymous says:

      Same here. Do you have a solution?

      Same here. Do you have a solution?

      1. Feb 03, 2009

        Anonymous says:

        Add Applications/ before the apps name, e.g. DisableApp.wsf "Applications/Applic...

        Add Applications/ before the apps name, e.g. DisableApp.wsf "Applications/Applicationname"

  2. Apr 21, 2009

    Anonymous says:

    it runs, but its very slow.  Is there any way to speed up the process?

    it runs, but its very slow.  Is there any way to speed up the process?

  3. Jun 03

    Anonymous says:

    i needed to do the following to work >cscript disable.wsf "Applications/fold...

    i needed to do the following to work

    >cscript disable.wsf "Applications/foldername/appname"

    ("folder structure as if looking at the Citrix Manage Console")

    i.e >cscript disable.wsf "Applications/Microsoft Office/Microsoft Word"

  4. Jul 07

    Ed Burke says:

    A quick an easy work around to disable multiple applications is to call the scri...

    A quick an easy work around to disable multiple applications is to call the script via a batch file.  You do need to comment out or remove the two following lines at the end of script to avoid the "Press ENTER to exit..." prompt

    WScript.Echo "Press ENTER to exit..."
    WScript.StdIn.Read(1)
    

    After this use the following logic in your batch file to enable your applications (it's not pretty but it does the job in a pinch):

    @echo off
    cscript disableapp.wsf "Applications/<application folder>/<application name #1>"
    cscript disableapp.wsf "Applications/<application folder>/<application name #2>"
    cscript disableapp.wsf "Applications/<application folder>/<application name #3>"
    

Add Comment

Related Links