Thanks, Dennis, I'll keep that code around.   The way Citrix lists the
local drives, it is very hard for the not-so-savvy user to figure out how
to copy and paste things from the Citrix server down to their local
machine.   We're worried that people are going to mess this up.  I'll
see if your code can help us figure out for them "where" their local
drive is.

Karen


In a message dated 10/26/2011 2:56:02 PM Central Daylight Time, 
[email protected] writes: 
> Here is some code I use to discover the local c drive.
> It makes it dead easy to write files to a local directory.
> 
> --find client C Drive
> SET VAR vClientCDrive TEXT = 'C:'
> 
> SET VAR vTmpPath = (CVAL('Scratch') + '\GetNet.TXT')
> 
> SET VAR vTmp TEXT = ('ZIP Cmd /c net use >' &.vTmpPath)
> 
> &vTmp
> 
> CREATE TEMP TABLE TempGetNetUse (TempLocal TEXT (2), TempRemote TEXT (20))
> 
> LOAD TempGetNetUse FROM .vTmpPath +
>   AS FORMATTED USING TempLocal 14 15, TempRemote 24 43
> 
> SET VAR vTmp = NULL
> SET ERROR MESSAGE 2059 OFF
> SELECT TempLocal INTO vTmp FROM TempGetNetUse WHERE TempRemote = 
> '\\client\c$'
> SET ERROR MESSAGE 2059 ON
> 
> IF vTmp IS NOT NULL AND vTmp LIKE '_:' THEN
>   --user is on citrix
>   SET VAR vClientCDrive = .vTmp
> ENDIF

Reply via email to