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
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.
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:
- In the pre-launch script, enter the following
REGREAD "HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\consoleone.exe," dos set app_path="%99"
- In the “path to executable”, just enter
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.