RG034 – User driven app-install with WM & AM

By Patrick Kaak


The RES Workspace Manager by it self, does not offer a solution to install applications on the workstation of a user, when a user needs it.  Of course you can use virtualization and application streaming, but this is not always feasable, as not all applications can be virtualized.

RES Automation Manager is the solution for this. Automation Manager is a product, which can perform installations on a computer, among many other tasks. Workspace Manager has an integration with RES Automation Manager. By adding a simple RES Automation Manager action on the property sheets of a Workspace Manager application, you can add an on-demand installation.

Let’s start with the preparations in RES Automation Manager. As an example we will use 7zip. First you create a resource for the installation executable. A ressource is any kind of file or file set, which is needed for a given Automation Manager job. Second, you create a module with the tasks needed to install the application. In this case, we would need to install the software silent, so user aren’t bothered by questions for the installation.  So we add an unattended installation task to the module with ‘/S’ as parameter to make the installation silent. Note: The /S parameter in this case is specific to the 7Zip package. Other software packages may need other switches.

When all necessary installation tasks are in place, we’ll do a test run of the module. When everything works, we will add a new task, to give the user a message that the installation is in progress. The reasoning for this is because the application has not been detected on the system. To give the message, we place a messagebox tasks in front of all the installation jobs already in the module. Note, the messagebox part is optional, as Workspace Manager itself also is able to display a message to the user.

After this, we add a task to the module, which will help the RES Automation Manager in a later stage, to determine if the software is installed or not.  This is a good best practice which would be applicable no matter what the installation source is. There are several ways of doing this. For example, you can place a file on the machine or add a registry key. In this case we choose the latter. We place a registry key, which name is the name of the program and where the value is the version number. When you ever need to update the software, you can use the version number to determine if the update still has to run.

Now we open the Unattended Installation task again, as we have to place an condition on it. We have to check if the registry key created during installation, already exist. If so, then we do nothing and stop all tasks. If this is not the case, we carry out all installation tasks.

Those who know RES Automation Manager may wonder why the condition to check whether a file with a specific version is present, is not used. The reason is that checking a registry key is faster and sometimes developers forget to put a version number in a executable file or to perhaps event to update the versionnumber of the file when publising a new file.

The RES Automation Manager module is now ready. Now we have to add it to a Managed Application shortcut in the RES Workspace Manager. First however, we must ensure that the integration between RES Automation Manager and Workspace Manager is active. Go to Setup -> Integration -> RES Automation Manager and fill in all details. Then test the connection.

Now you create the Managed Application shortcut to the application as you normally would do. Ensure that the checkbox “do not show when executable is not found on the system” is not checked, as the app would then never show up.  Then go to Configuration -> Actions and add a new Automation Manager task. Check“Wait for task to finish” and “Run before other tasks”.

On the Task item, click the button to browse for the module/project, which you want to have executed. The RES Workspace Manager console will then dive into the Automation Manager database and read all available modules and projects.

Everything is now ready to go. When a user clicks on the RES managed shortcut on the start menu, or when the application is started through a file extension (if registered within Workspace Manager), the RES Automation Manager action will run before everything else. Automation Manager first checks if the application is installed by the registry key. If it is not the case, it will run the installation taks before starting the application. Is the application already installed, the application will start immediately. Of course there is a minimal delay in starting the application this way.  In a normal environment it takes about 3-5 seconds, provided the application is installed. A way to avoid this is to use the Run-once option when configuring the automation manager task on the Managed Application.

It serves to note that this method may not always be applicable. Applications where a reboot is required, can obviously not be installed this way. Also, this method is not recommended on a Terminal Server solution, as multiple users executing the same installation of the same server on what is essentially the same file system can very likely lead to unpredictable results.

No Comments

No comments yet.

RSS feed for comments on this post.

Leave a comment

Comments are welcome as always. Just do the math below. * Time limit is exhausted. Please reload the CAPTCHA.