• 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

Delete Suffix to application name

 <package>
    <job id=" NoMoreSuffix">

        <comment>

        File:           NoMoreSuffix.wsf
        Description:    Delete Suffix to application name following installation of Hotfix PSE450R01W2K3035/PSE400R04W2K3012
        Requirements:   WSH 5.5 or higher.
       

        </comment>
        <runtime>
            <description>
              Delete Suffix to application name following installation of Hotfix PSE450R01W2K3035/PSE400R04W2K3012. Following the deployment of Hotfix PSE450R01W2K3035/PSE400R04W2K3012, a random suffix is added to the application name. this is source of issue with static ICA FILE or CUSTOM PORTAL as application display name doesn't correspond anymore to application name
            </description>
            <example>
                CScript //nologo NoMoreSuffix.wsf
            </example>
 
        </runtime>
        <reference object="MetaFrameCOM.MetaFrameFarm"/>
        <script language="VBScript">
       
            Dim theFarm
           
            '
            ' Create MetaFrameFarm object
            '

            Set theFarm = CreateObject("MetaFrameCOM.MetaFrameFarm")
            if Err.Number <> 0 Then
                WScript.Echo "Can't create MetaFrameFarm object"
                WScript.Echo "(" & Err.Number & ") " & Err.Description
                WScript.Echo ""
                WScript.Quit Err.Number
            End if

            '
            ' Initialize the farm object.
            '

            theFarm.Initialize(MetaFrameWinFarmObject)
            if Err.Number <> 0 Then
                WScript.Echo "Can't  Initialize MetaFrameFarm object"
                WScript.Echo "(" & Err.Number & ") " & Err.Description
                WScript.Echo ""
                WScript.Quit Err.Number
            End if

            '
            ' Are you Citrix Administrator?
            '

            if theFarm.WinFarmObject.IsCitrixAdministrator = 0 then
                WScript.Echo "You must be a Citrix admin to run this script"
                WScript.Echo ""
                WScript.Quit 0
            End If

            '
            ' Print out the farm name.
            '

            WScript.Echo "MetaFrame Farm Name: " & theFarm.FarmName
            WScript.Echo ""

             For Each anApp In theFarm.Applications

                 
                 WScript.Echo "Name             : " & anApp.AppName
                 WScript.Echo "BrowserName      : " & anApp.BrowserName
                   
   anApp.loaddata(true)
   '
             ' if application has been Suffixed then force application to correspond to display name
          '
   if anApp.BrowserName <> anApp.AppName then
    anApp.BrowserName2 = anApp.AppName
    anApp.savedata()
    wScript.Echo "Application " & anApp.AppName & " Is modified"
    end if
   'wScript.Echo "Application " & anApp.AppName & " Is modified"
  
            Next
 
     set theFarm=Nothing         
     set anApp=Nothing         
            WScript.Echo "Press ENTER to exit..."
      
        </script>
    </job>
</package>

Tags

mfcom mfcom Delete
application name application name Delete
Enter tags to add to this page:
Please wait 
Looking for a tag? Just start typing.
Related Links