FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Terminal Server redirected drives
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Terminal Server redirected drives
Posted: Mon Feb 24, 2014 05:38 PM
Hi, I'm doing some tests in terminal server mode.
My issue: I need to manage inside my FWH app the list of redirected drive (in this case tsclient/C, tsclient/D tsclient/K. How can I have the list of all tsclient resources ?
I understand I should use the API call wnetenumresource or something similar. Is it supported in FWH or is there any other solution ?
Thank you in advance.


Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Terminal Server redirected drives
Posted: Mon Feb 24, 2014 05:44 PM

Maybe you can do something with aDrives function ()

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Re: Terminal Server redirected drives
Posted: Mon Feb 24, 2014 06:14 PM

Unfortunately the redirected drives are UNC not mapped drives so they are not visible from aDrives()

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Terminal Server redirected drives
Posted: Mon Feb 24, 2014 06:34 PM
Watch this thread
I think it says as see mapped drives


viewtopic.php?f=6&t=25108&p=136822&hilit=WBEMScripting.SWBEMLocator#p136822


* --------------------------- // -------------------------- *
sMensaje += CRLF + "Lista de unidades Mapeadas por el PC:" + CRLF
FOR Each oDatos in oHard_Unidades
sMensaje += "Device ID: " + oDatos:DeviceID + ;
"Nombre: " + oDatos:Name + ;
"Espacio Libre: " + cValtoChar ( oDatos:FreeSpace ) + ;
"Tamaño: " + cValtoChar ( oDatos:Size ) + CRLF
NEXT
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Re: Terminal Server redirected drives
Posted: Thu Feb 27, 2014 02:47 PM

Solved this way

mnu1:={}
for i:=65 to 90
cVar1:="Drive "+chr(i)
cVar2:="Not available"

        if isdir("\\tsclient\"+chr(i))
            cVar2:="Redirected drive"
            cVar3:="\\tsclient\"+chr(i)
        endif
        aadd(mnu1,{cVar1,cVar2})
    next
Best Regards,



Marco Turco

SOFTWARE XP LLP

Continue the discussion