Article

rudd_j's picture
article
Reads:

5570

Score:
0
0
 
Comments:

2

Setting up ZENworks Applications for Multiple versions of Applications

Author Info

17 January 2008 - 2:16pm
Submitted by: rudd_j

(View Disclaimer)

By James Rudd

Here is a quick tip for ZENworks users to create application objects that will work with an application installed in different locations.

Often in large networks there will be multiple versions of a program across computers, whether due to licensing, hardware requirements or personal preference.

For example some users may want the new Word 2007, some may prefer 2003 and some older PCs may still be on XP; similarly with Adobe applications like Photoshop 6 /7 CS –CS3.

The problem with these applications is that each new version has a different path, so a different application object is usually needed.

One easy way to manage this is to create a single application object for the application that will work with whichever version is installed, and will only show up if a copy of the program is installed.

Most applications create an entry in the App Paths section of the registry. This tells Windows where the application is located and what to run if just the executable name is called from run command.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App
Paths\
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\

A ZENworks application can check if a registry key exists for an application and then run it using the exe name of the program.

For example, an application for Microsoft Word has an application check for the existence of a key:

Registry
data(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App
Paths\Winword.exe:) exists

And then the application to run is just "Winword.exe", which will start the most recently installed version on the computer.

Additional Suggestions

Shaun Pond

This does allow for multiple application versions, but only if they are on the PATH. If you have the Novell client, you could build on this tip as shown in this example for launching ConsoleOne:

  1. In the pre-launch script, enter the following
    REGREAD "HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\consoleone.exe,"
        dos set app_path="%99"
  2. In the "path to executable", just enter
    %app_path%

This works by reading the value data for the (default) value in the registry key, and placing it in the environment variable "app_path", which is then used to launch the app.

Note that REGREAD does require the Novell Client, so won't work for clientless workstations using the Mid Tier.


Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).

It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.




User Comments

rudd_j's picture

Applications don't need to be in PATH

Submitted by rudd_j on 18 January 2008 - 5:43pm.

Hi Shaun,
The applications don't need to be in the PATH variable.
In your example above just try typing "consoleone" into the Run command, and if a reg key exists for it in App Paths it will launch that version.
The same will work from within Zen App objects.
From my example above WinWord.exe is in MS Office folder, which is not part of the PATH. Yet typing in WinWord to run command will start the program.
I have used this method successfully for a few years as we have migrated from Office 97 through 2000, XP, 2003 to 2007.

spond's picture

Never too late to learn something new

Submitted by spond on 21 January 2008 - 7:24am.

You're quite right, nice to find something new!

© 2013 Novell