Gizmo said:Hello,
How can I know the path where progress was installed?
When I use 'os-getenv("DLC" )' I retrieve a '?'.
Thanks,
Gizmo
bendaluz2 said:Have you set up the DLC environment variable?
def var cDLC as char no-undo.
cDLC = os-getenv("DLC").
if cDLC = ? and opsys = "WIN32"
then get-key-value section "Startup" key "DLC" value cDLC.
if cDLC = ?
then do:
cDLC = search("prolang/convmap").
if cDLC <> ?
then cDLC = substring(cDLC, 1, index(cDLC,"/prolang") - 1).
end.
Simon Sweetman said:Hi Gizmo, how about the following:
Code:def var cDLC as char no-undo. cDLC = os-getenv("DLC" ). if cDLC = ? and opsys = "WIN32" then get-key-value section "Startup" key "DLC" value cDLC. if cDLC = ? then do: cDLC = search("prolang/convmap" ). if cDLC <> ? then cDLC = substring(cDLC, 1, index(cDLC,"/prolang" ) - 1). end.
This uses DLC env variable first and then the registry (if under windows) and finally searches the propath for convmap to resolve the DLC directory.