I have some DOS batch scripts that run modeler.exe which executes an .mdl. The DOS batch script has to specify the path where modeler.exe resides. We have 32-bit and 64-bit computers with different versions of ERDAS, so the path is different on each PC. I'd like to use a system/environment variable in my scripts that contains the path to the modeler.exe.
Do you know how to automatically determine where modeler.exe resides on a computer? How is the IMAGINE_HOME variable set and how do I get it's value (using a DOS script)?
We don't not recommend to setup an "IMAGINE_HOME" environment variable for your system. If you point this variable to v9.3 root folder, then your IMAGINE 2011 will not work.
For example, IMAGINE v2010 will save its IMAGINE_HOME on registry "HKEY_LOCAL_MACHINE\SOFTWARE\ERDAS\Imagine\10\ImagineHome"
You can try some thing like this: C:\Documents and Settings\xxx>reg query "HKEY_LOCAL_MACHINE\SOFTWARE\ERDAS\Imagine\10" /v "ImagineHome"
this will return the IMAGINE home path to you, then you can use this to locate the modeler.exe
If permission is not granted to run reg query, you can search from the IMAGINE software root directory to avoid full drive searches.