What is the best way to verify that a machine has ArcInfo Workstation installed? A code sample in VBA, VB or C# would be great!
|
|
They say it's acceptable to answer your own question, so here goes ... Workstation should install a key in Window's registry. So just search the registry to see if it exists. Here's an example in VB.Net:
|
|||||||||
|
|
If you don't have access to poke around in the registry (happens to me often) a poor-mans method would be to look for the system environment variable ARCHOME. If that's there, check under that for the existence of the executable file ARCHOME\bin\arc.exe (or, on Unix, $ARCHOME\bin\arc.exe). Because the default "Program Files" folder contains spaces, you are more likely to find ARCHOME at somewhere like : "C:\arcgis\arcexe10x". ARCHOME is required to be set for ArcInfo Workstation to operate correctly, and it will be removed from the environment on uninstall. |
|||
|
|
|
Here's a VBS fragment I used for uninstalling Google Earth via a startup script. You can use these WMI objects to poll machines for the ArcInfo Workstation installation, assuming it's registered in the product catalogue.
Reference: Documentation for the Win32_Product class. |
|||
|
|

