Page 1 of 1 1
Topic Options
#187888 - 2008-05-27 04:09 PM Use \\client
breyden Offline
Fresh Scripter

Registered: 2008-05-27
Posts: 6
This may be a basic question or not, but I'm re-examining a script for our Citrix environment and am convinced the script isn't working. It is:

use y: \\client\H$

I think the intention was to map y to the users already mapped h drive on their desktop; not sure why the h has a $ as it is not hidden). I've isolated the script to just the piece above and verified that is doesn't work. Can anyone shed some light?

Top
#187889 - 2008-05-27 04:25 PM Re: Use \\client [Re: breyden]
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
Welcome to the board!
Look in the manual regarding the SetOptions, and propper qouting - don't have it in my head right now.
_________________________
as long as it works - why fix it?
If it doesn't work - kix-it!

Top
#187890 - 2008-05-27 04:27 PM Re: Use \\client [Re: Björn]
breyden Offline
Fresh Scripter

Registered: 2008-05-27
Posts: 6
the setoptions?
Top
#187892 - 2008-05-27 04:34 PM Re: Use \\client [Re: breyden]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Yes, SetOption.
These will safe you a lot of pain when using dollar characters or at characters ($ and @) in your script.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#187893 - 2008-05-27 04:36 PM Re: Use \\client [Re: Mart]
breyden Offline
Fresh Scripter

Registered: 2008-05-27
Posts: 6
ok but my concern is not that the $ is interfering, it is the fact that use y: \\client\H is not working....
what is supposed to be the syntax....

Top
#187894 - 2008-05-27 04:37 PM Re: Use \\client [Re: breyden]
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
My memory is a bit vague, but I think that this has come up in conversation bbefore and the conclusion was that KiXtart does not support the \\client redirector.

You can try using SHELL.
 Code:
Shell "NET USE Y: \\CLIENT\H"

Top
#187895 - 2008-05-27 04:46 PM Re: Use \\client [Re: Richard H.]
breyden Offline
Fresh Scripter

Registered: 2008-05-27
Posts: 6
I'm getting this

ERROR : unknown command [\\CLIENT\Y]!
Script: Q:\mapdrive.kix

Top
#187922 - 2008-05-28 02:32 PM Re: Use \\client [Re: breyden]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
mismatched quotes.
_________________________
!

download KiXnet

Top
#187925 - 2008-05-28 05:05 PM Re: Use \\client [Re: Lonkero]
breyden Offline
Fresh Scripter

Registered: 2008-05-27
Posts: 6
So i've
IF INGROUP("SAP")=1
USE y: /d
SLEEP 5
USE y: "\\CLIENT\c$" /persistent
doesn't work
tried

Shell "NET USE Y: \\CLIENT\H"
doesn't work.

Can anyone specify the exact syntax?

Top
#187927 - 2008-05-28 11:57 PM Re: Use \\client [Re: breyden]
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
so,
you need to do something like (or test)
 Code:
/* blockquoted
From the Reference Manual
SetOption - 
NoVarsInStrings
ON,OFF
Determines resolution of variables inside strings. 
If this option is enabled, any ‘$’ character in a string will be 
left as-is. The default is OFF.
IE - $SO=SetOption('NoVarsInStrings','ON')
*/
If InGroup('SAP')
 'Will try to delete Y: ' ?
 USE Y: /Delete
 'Result: ' + @ERROR + '  ' + @SERROR ?
 'Will now try to map Y: again ' ?
 $SO=SetOptions("NoVarsInStrings','ON')
 USE Y: \\client\H$
 'Result: ' + @ERROR + '  ' + @SERROR ?
 ;will try the shell-thingy if not working
 If @ERROR
  'trying the shell-part instead' ?
  USE Y: /Delete
  shell 'net use y: \\client\H$'
  'Result: ' + @ERROR + '  ' + @SERROR ?
 endif
 $SO=SetOption('NoVarsInStrings','OFF')
endif



Might be really stupid, or it might work and perhaps give you some result. Can't really test it out myself right now tho.
_________________________
as long as it works - why fix it?
If it doesn't work - kix-it!

Top
#188136 - 2008-06-10 08:49 PM Re: Use \\client [Re: Björn]
breyden Offline
Fresh Scripter

Registered: 2008-05-27
Posts: 6
cool thanks all
Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 781 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.062 seconds in which 0.028 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org