Working with apputil Print E-mail
Written by Hans Straat, Wednesday, 04 October 2006

If your working with citrix metaframe presentation server 3.0 or 4.0 enterprise edition you get for free the apputil.exe. The apputil.exe can however also be used on standard and advanced editions Cool. We tried to get a confurmation from Citrix if it's legal or not but hey they simply do not respond, but what else is new if you don't have a case logged.

The apputil comes with a few parameters

AppUtil.exe /q
AppUtil.exe /i <App ID> <Hostname>
AppUtil.exe /u <App ID> <Hostname>
AppUtil.exe /qj <Job ID>
AppUtil.exe /qp
AppUtil.exe /ip <Package ID> <Hostname> [/AIE <aieid>] [REBOOT]
AppUtil.exe /up <Package ID> <Hostname> [/AIE <aieid>] [REBOOT]

 

The parameters explained

/q   List available published applications.

/i   Add a server to the Configured Server list for the specified published
     application. If the selected application publishes an Installation Manager
     Package, running this utility with this option also installs the packaged
     application.

/u   Remove a server from the Configured Server list for the specified
     published application. If the application publishes an Installation
     Manager package, using this option does not uninstall the package.

/qp  List available Installation Manager packages and package groups.

/qj  Query status of a given job.

/ip  Schedule install of an Installation Manager package or package group on
     a specified server. The /AIE option tells Installation Manager which
     Application Isolation Environment to install the package or package group.
     The REBOOT option forces the server to reboot after the job is complete.

/up  Schedule uninstall of an Installation Manager package or package group
     on a specified server. The /AIE option tells Installation Manager which
     Application Isolation Environment the package or package group should be
     uninstalled from. The REBOOT option forces the server to reboot after the
     job is complete.

Imaging you have to remove a citrix server from all of your currently published applications and it needs to be done fast.

You can either doing it one by one, going to properties > servers > select server > remove it from the list.

When you use apputil.exe /q you get a list that looks like following depending ofcourse how many published applications you have


C:\>apputil /Q

There are 3 published applications available.

Application ID      Type         Description

6d5c-0009-000002e0  Application  notepad
6d5c-0009-000002e3  Application  Wordpad
6d5c-0009-000002e6  Application  Microsoft Paint

now you see 3 items. The application ID the type and description

Imaging you server hosts all above applications and you want to remove them. Well in this case it would be simple

C:\>apputil /u 6d5c-0009-000002e0 servername

and you get following output

The published application is no longer configured for the specified server.

Now doing this 2 more times and the server won't list anymore published applications. But what if you have about 100 published applications and time is not on your site doing it manually.

Well you can use apputil /q > c:\applications.txt pushing the list to a text file.  Now next step would be importing the list in a excell sheet

Figure 1

raw import

 At figure 2 we changed the columns a bit. As you can see the columns are filled in now. B contains the servername and C the apputil /u command. Now we have to merge them with a excell formula see Figure 3

Figure 2

changed data

At figure 3 you can see the merged outcome of the formula we used. You can now simply select all in column D and paste it into notepad. Naming it for example RemoveApps.cmd and doubleclick the cmd file and all applications will be removed from that server. You can offcourse also add a server to published applicatins this way by using the apputil /i command Cool

Figure 3

merged data

We used these formula.

English: =CONCATENATE(C5; " "; A5; " "; B5)

Dutch: =TEKST.SAMENVOEGEN(C5," ", A5, " ", B5)

I am not sure if the apputil.exe from Metaframe XP FR3 still works on presentation server 3.0 and 4.0 but you can download both the files here

You can find the apputil.exe in presentation server 3.0 and 4.0 at the install cd under the directory "MetaFrame Presentation Server\Program Files\Citrix\System32" You will get warnings if you copy the apputil.exe to your system32 directory of your server that it's missing some dll's simply copy the dll's into the system32 directory should solve that issue. But first try the apputil.exe we handed for download.

Note: use it on a testserver first we cannot held responsible if you break a production server!!

 

Comments
Add NewSearch
Only registered users can write comments!
 
< Prev   Next >