Page 1 of 3 123>
Topic Options
#125791 - 2004-08-29 03:10 PM Mapping to a subfolder
Duckling Offline
Fresh Scripter

Registered: 2003-10-06
Posts: 5
Trying to map users' home directories, by mapping to subfolders on a share. (\\server\share\user1).
This works fine on W2K workstations, but not on our Terminal Servers.

I'm guessing I missed something, but I can't ifgure it out..

Cheers,
Anders

Top
#125792 - 2004-08-29 03:26 PM Re: Mapping to a subfolder
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
A user's home directory should map automatically on a W2K Pro box. Are you trying to map the drive via logon script? Can you post some code?
Top
#125793 - 2004-08-29 03:41 PM Re: Mapping to a subfolder
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Automatically only if set in the user's profile. What version of Terminal server, W2K or NT4 TSE? For NT4 you need to use SUBST.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#125794 - 2004-09-07 01:08 PM Re: Mapping to a subfolder
Duckling Offline
Fresh Scripter

Registered: 2003-10-06
Posts: 5
Sorry for the lack of specifics...
I am trying to map through KiXtart. However, I have found since my post that the problem only occurs when connecting through Metaframe Presentation server over the web. Not when I use Citrix on our LAN.. so I am guessing KiXtart isn't the problem...
I've included the code, though in case anyone can spot some obvious weakness..
We check for OS (we have the whole range of OSes, from 98 to XP), then try to map to the \\server\users\username folder, if that doesn't work, we try to map to \\server\username (because some users still have their homedirs shared directly). None of the TS users have their homedirs shared diretly, so when the mapping of \\server\users\username fails, they're stuck
Here's the code.

Code:

if @PRODUCTTYPE = "Windows 2000 Professional" or @PRODUCTTYPE = "Windows XP Professional" or @PRODUCTSUITE = 16
use U: "\\server\users$\" + @USERID /persistent
if @ERROR <> 0
use U: "\\server\" + @USERID + "$$" /persistent
if @ERROR <> 0
Messagebox("didn't find homedir for " + @USERID, "Logon error", 48)
endif
endif
else
;Win98-code here
endif



Thanks for helping!
Anders

Top
#125795 - 2004-09-07 01:27 PM Re: Mapping to a subfolder
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
you are probably killing the code with your producttype thing.
in TS, you will get the value of the server, not the client.
_________________________
!

download KiXnet

Top
#125796 - 2004-09-07 01:28 PM Re: Mapping to a subfolder
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
on the other, productsuite=16 is TS, silly me.
_________________________
!

download KiXnet

Top
#125797 - 2004-09-07 01:47 PM Re: Mapping to a subfolder
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
See Les's comment:
Quote:

What version of Terminal server, W2K or NT4 TSE? For NT4 you need to use SUBST




The network redirector for NT4 does support deep mapping, so if your users running via Presentation Server have virtual NT4 workstations you will have a problem.

If this is the case you will need to map a drive to the share, then use SUBST to deep map the home drive.

Something like:
Code:
use Y: "\\server\users$$"

Shell '"%COMSPEC%" /C SUBST U: Y:\'+@USERID


Top
#125798 - 2004-09-07 02:31 PM Re: Mapping to a subfolder
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Quote:

on the other, productsuite=16 is TS, silly me



Being a bitwise value, it needs to be anded (&16). Also need to watch for XP. There is a FAQ on that.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#125799 - 2004-09-14 04:20 PM Re: Mapping to a subfolder
Duckling Offline
Fresh Scripter

Registered: 2003-10-06
Posts: 5
Well, I have verified that the test for OS works.
But the second line
Code:
use U: "\\server\users$\" + @USERID /persistent



fails.
We're running W2K TS, and there is no Windows XP in this equation (so far), clients are also Win2K.

Cheers,
Anders

Top
#125800 - 2004-09-14 04:34 PM Re: Mapping to a subfolder
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I still say your @ProductSuite logic is flawed. There is a FAQ on it.

You are using $ inside quotes and according to the manual, when used inside quotes, it should be doubled as per Richard's example.

Why do you map persistent if it is remapped on every logon? Also, if you map persistent, you also have to /delete /persistent.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#125801 - 2004-09-24 01:09 PM Re: Mapping to a subfolder
Duckling Offline
Fresh Scripter

Registered: 2003-10-06
Posts: 5
Problem solved.
Thanks for all the tips, but the bottom line was:
I'm an idiot.

The single $ was not the problem either, double $$ inside quotes was originally used, a guy I spoke to suggested I test without, I just happened to copy the script text while I was testing...

After checking more closely, it turns out that the problem was completely unrelated to Kix.

The tested home computers all had too many
local drives, thus the U: drive was already taken when I tried to map to it.

I will go and kill myself in shame now.


Anyway, thanks everyone for all the feedback!
Cheers,
Anders

Top
#125802 - 2005-01-12 12:03 AM Re: Mapping to a subfolder
bestia Offline
Fresh Scripter

Registered: 2004-08-26
Posts: 36
Loc: Guildford, UK
Can you please send me the code you used to do deep mapping on NT4 TSE !? I still can't mapp to users ID ?
Rgds
Bestia

Top
#125803 - 2005-01-12 12:13 AM Re: Mapping to a subfolder
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
the code is posted above in the richards post.
_________________________
!

download KiXnet

Top
#125804 - 2005-01-12 10:41 PM Re: Mapping to a subfolder
bestia Offline
Fresh Scripter

Registered: 2004-08-26
Posts: 36
Loc: Guildford, UK
Hi Thank you for the quick reply!
I have tried the above code, but what happens when I logon to a NT4TSE it mapps the the Correct user home drive, but it only display the Users folder !? What I mean is the path to users home drive is the format \\server\users$\%username%, so when script runs instead of displaying the user name (H:jdoe's Home Drive) it displays the above folder(H:Users$) !!!? But when you open that mapped drive, it has mapped to the correct loged on user Home drive ! Is this by desing ?? I hope this makes sense to you guys..
Please help,
Rgds,
Bestia

Top
#125805 - 2005-01-12 11:32 PM Re: Mapping to a subfolder
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Deep mapping is not supported by NT4. Only 2000 or better.

Sorry.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#125806 - 2005-01-13 02:06 AM Re: Mapping to a subfolder
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
This is not a KiX issue! BTW, NT4TSE sucks big time. Toss it and get W2K3.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#125807 - 2005-01-13 07:48 AM Re: Mapping to a subfolder
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
stop listening to these boys.
k, if only the label is wrong anymore that is cosmetics and can be fixed easily.
there are label udf's in our "user defined functions" library. pick one.
_________________________
!

download KiXnet

Top
#125808 - 2005-01-13 07:51 AM Re: Mapping to a subfolder
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
and to not totally drop the ball here.
you are deepmapping just to fool your users.
when this is needed, you are loose on security and you are on the way to trouble.
_________________________
!

download KiXnet

Top
#125809 - 2005-01-13 11:47 AM Re: Mapping to a subfolder
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
As has been mentioned frequently in this post, you cannot do deep mapping in NT4

You can only map a drive to the root of the share level.

You have two options. Either share out every home directory and map to it, or use SUBST.

If you want to your SUBST to simulate deep mapping then do the followuing:
Code:
use Y: "\\server\users$$"
Shell '"%COMSPEC%" /C SUBST H: Y:\'+@USERID



The Y: drive is mapped to the root of the share, as that is all NT will allow. You will see the Y: drive mapping in "net use".

The H: drive will not appear in "net use". It will appear in explorer though, and it will be mapped to the users' home directory.

Oddly, when I tested this the drive appears labled as "disconnected network drive" in Explorer on WinXP.

Top
#125810 - 2005-01-13 12:49 PM Re: Mapping to a subfolder
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
richie, sure sure sure.
but how many times he has said he has problems with that?
none.

he says, his label is screwed up.
just like you confessed it being too.
_________________________
!

download KiXnet

Top
Page 1 of 3 123>


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

Who's Online
0 registered and 507 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.069 seconds in which 0.024 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