Sure you can do this
C_BOOLEAN($0)
C_TEXT($1)

C_BOOLEAN($Availalble_b)
C_TEXT($in;$out;$err;$ServerName_txt)
$ServerName_txt:=$1
C_LONGINT($alive_L)
If (on windows)
    SET ENVIRONMENT VARIABLE("_4D_OPTION_HIDE_CONSOLE";"true")
    LAUNCH EXTERNAL PROCESS("ping -n 2 "+$ServerName_txt;$in;$out;$err)
    $alive_L:=Position("could not find host";$out)
    $Availalble_b:=Not($alive_L>0)

Else
    SET ENVIRONMENT VARIABLE("_4D_OPTION_HIDE_CONSOLE";"true")
    LAUNCH EXTERNAL PROCESS("ping -c 2 "+$ServerName_txt;$in;$out;$err)
    $alive_L:=Position("Unknown host";$err)
    $Availalble_b:=Not($alive_L>0)

End if

$0:=$Availalble_b


On Mon, Mar 22, 2021 at 9:59 AM stardata.info via 4D_Tech
<[email protected]> wrote:
>
> Hi All,
>
> In one of my applications in 4D V16 on windows, I need to use network unity.
> Can happen that one of the network unity is unavailable, so when I call
> TEST PATHNAME command, the 4d application remains sometimes in a " not
> responding " state. I try to use Net_Ping command to check if the ip address
> of the pc that contains the folder that I have to need to reach is
> available, but in the manual, I read that this command works only with
> administrator user.
>
> Someone can give a suggestion to solve it?
>
> Thanks
> Ferdinando
>
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> New Forum: https://discuss.4D.com
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[email protected]
> **********************************************************************



-- 
-----------------------------------------------------------------------------------------
 Chuck Miller Voice: (617) 739-0306 Fax: (617) 232-1064
 Informed Solutions, Inc.
 Brookline, MA 02446 USA Registered 4D Developer
       Providers of 4D, Sybase & SQL Server connectivity
          https://www.informed-solutions.com
-----------------------------------------------------------------------------------------
This message and any attached documents contain information which may
be confidential, subject to privilege or exempt from disclosure under
applicable law.  These materials are intended only for the use of the
intended recipient. If you are not the intended recipient of this
transmission, you are hereby notified that any distribution,
disclosure, printing, copying, storage, modification or the taking of
any action in reliance upon this transmission is strictly prohibited.
Delivery of this message to any person other than the intended
recipient shall not compromise or waive such confidentiality,
privilege or exemption from disclosure as to this communication.
**********************************************************************
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to