Works as excepted, no surprises here.
Problem is how to make shell wait for input.

Jussi


Please, try the following code and tell us if it works for you:
>
>
> PRIVATE $hprocess AS Process
>
> PUBLIC SUB Form_Open()
> DIM pwd AS String
>
> pwd = InputBox("Type your root password", "Root privileges needed")
>  IF pwd THEN
>    $hprocess = SHELL Subst("echo &1 | sudo -S ls /root", pwd) FOR READ
>  ELSE
>    RETURN
>  ENDIF
> END
>
> PUBLIC SUB Process_Read()
> DIM outstr AS String
>
>  WHILE NOT Eof($hprocess)
>    LINE INPUT #$hprocess, outstr
>    PRINT outstr
>  WEND
>
> END
>
> The only drawback is that passwords in the inputbox are not hidden.
>
> Regards,
>
>
> --
> Jesus, EA7DFH
>
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> Gambas-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
------------------------------------------------------------------------------
Virtualization is moving to the mainstream and overtaking non-virtualized
environment for deploying applications. Does it make network security 
easier or more difficult to achieve? Read this whitepaper to separate the 
two and get a better understanding.
http://p.sf.net/sfu/hp-phase2-d2d
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to