if exists file
(
value "InstallLocation" of key whose
(
value "DisplayName" of it as string as lowercase contains "EMC Avamar" as lowercase
)
of key "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of native registry as string & "var\avagent.cfg"
)
then if exists
(
line whose
(
it as lowercase contains "-mcsaddr="
)
of file
(
value "InstallLocation" of key whose
(
value "DisplayName" of it as string as lowercase contains "EMC Avamar" as lowercase
)
of key "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of native registry as string & "var\avagent.cfg"
)
)
then following text of first "-mcsaddr=" of
(
line whose
(
it as lowercase contains "-mcsaddr="
)
of file
(
value "InstallLocation" of key whose
(
value "DisplayName" of it as string as lowercase contains "EMC Avamar" as lowercase
)
of key "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of native registry as string & "var\avagent.cfg"
)
)
as string else "No Server" else "No CFG file"
if exists file (value "InstallLocation" of key whose (value "DisplayName" of it as string as lowercase contains "EMC Avamar" as lowercase) of key "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of native registry as string & "var\avagent.cfg") then if exists (line whose (it as lowercase contains "-mcsaddr=") of file (value "InstallLocation" of key whose (value "DisplayName" of it as string as lowercase contains "EMC Avamar" as lowercase) of key "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of native registry as string & "var\avagent.cfg")) then following text of first "-mcsaddr=" of (line whose (it as lowercase contains "-mcsaddr=") of file (value "InstallLocation" of key whose (value "DisplayName" of it as string as lowercase contains "EMC Avamar" as lowercase) of key "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of native registry as string & "var\avagent.cfg")) as string else "No Server" else "No CFG file"