Page 1 of 1 1
Topic Options
#142366 - 2005-06-24 10:46 PM Problems with @HOMESHR
GFunk Offline
Fresh Scripter

Registered: 2005-06-24
Posts: 10
Hello,

A few days ago I implemented Kixtart 4.23 for our login script processor. I have already migrated all our login scripts. We have both Windows 98 and Windows XP workstations.

Today I was debugging a problem with some new users that we have on our new file server. We are map rooting the user's home folder on the new file server.

In Active Directory (Windows 2000 Native) with Windows 2000 and Windows 2003 directory servers, my particular home folder is mapped I: to \\nrsfs01\users\kghammond.

When I run my kix script on my Windows XP SP2 PC, @HOMESHR = \\nrsfs01\users. In the same script, %HOMESHARE% = \\nrsfs01\users\kghammond.

Related to that, when I echo the enviornment variables, the are correct:
N:\>echo %HOMEPATH%
\

N:\>echo %HOMEDRIVE%
I:

N:\>echo %HOMESHARE%
\\nrsfs01\users\kghammond

But, if I run the command:
net use I: \home, it maps to \\nrsfs01\users

If I run the commmand:
net use %HOMESHARE%, it maps to \\nrsfs01\users\kghammond


In addition, when I logon to my Windows XP SP2 workstation or our Windows 2000 Terminal Server, my I: drive does not automatically map as it is supposed to from the Home Folder setting in my active directory profile.

So I assume this is an Active Directory issue that is not reporting the proper Home Folder path settings. I can easily work around it by replacing @HOMESHR with %HOMESHARE%.

In addition though, if I manually map I: in my kix script using %HOMESHARE%, Do I need to be careful about the OS trying to map I: as part of the Home Folder profile settings?

Thank you,
Kevin Hammond

Top
#142367 - 2005-06-24 11:07 PM Re: Problems with @HOMESHR
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
windows 98 has never and will never support deep mapping.
_________________________
!

download KiXnet

Top
#142368 - 2005-06-24 11:33 PM Re: Problems with @HOMESHR
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I have never had reliable results in setting the home drive in AD adn prefer not to do it that way. I simply map it in the logon script instead. Wintendos, I do not allow on my network.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#142369 - 2005-06-25 12:14 AM Re: Problems with @HOMESHR
GFunk Offline
Fresh Scripter

Registered: 2005-06-24
Posts: 10
Lonkero, thank you for the reply. I see you have been around for quite some time. If you read the post again, you will see that I am referring to Windows XP with the map root issue, not Windows 98. I did not explicitly specify that I am not concerned about the home drive mappings in Windows 98.

I already know about the Windows 98 problems but we don't need home drives for the Windows 98 users since the Windows 98 PCs are only used for legacy systems that do not require access to anyone's home drive.

If you do not use the home drive setting in AD, how do you map the drive %username% or @userID?

I have never worked on a Windows network without a home drive setting... Not sure how that will work. I wonder if terminal server requires a home drive in the AD profile...

I still am making the assumption that something is not correct in our AD though. I would like to fix our AD issues in addition to working around the Home Folder issue.

Thanks for the feedback

Top
#142370 - 2005-06-25 12:22 AM Re: Problems with @HOMESHR
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, you have not a single sample how did your maps go with kix.
you show that you have problem with windows NET USE but then it's a problem deeper than just a logonscript.
_________________________
!

download KiXnet

Top
#142371 - 2005-06-25 12:28 AM Re: Problems with @HOMESHR
GFunk Offline
Fresh Scripter

Registered: 2005-06-24
Posts: 10
Hmm,

I just discovered another interesting bit of information. The T: drive is being mapped on terminal server. T: is the Terminal Server Home Folder in AD Profile.

I wonder why that is...

Uh Oh, but on Terminal Server %HOMESHARE% is mapped to \\nrfs01\users\kghammond\data

Wow, this is getting complex very quickly. It seems the enviornment variables are changing and for some reason native w2k logon processing can handle the different enviornments without any problems.

Also Terminal Server seems to use teh T:\ to store various Terminal Server profile information.

I think I am going to have to retweak my login scripts to account for terminal server...

Back to an earlier question. Is it safe to unmap a drive that Windows Maps, then remap it to the same location? Just in case Windows doesn't map the drive for some reason?

Thanks again,
Kevin

Top
#142372 - 2005-06-25 12:30 AM Re: Problems with @HOMESHR
GFunk Offline
Fresh Scripter

Registered: 2005-06-24
Posts: 10
Here is my current script, but as I said, it will take some tweaking since I need to detect for Terminal Server now as well. I borrowed someone else's login script to get the basic script in place including the graphical portion of the script.
Code:
  
$TITLE = SetTitle("Logging into Domain. Please wait...")
$CONSOLE = SetFocus ("Logging into Domain. Please wait...")

CLS
$section=1 ;Section 1
Color c+/n
Box (9,29,15,46,single)

Color r+/n
At (10,30) "Welcome to the,"
At (12,30) @domain
At (12,39) "domain"
At (14,30) @fullname
Sleep 4

Small
Color b+/n
Box (0,0,24,79,GRID) ; ''background grid''
Color b/n
Box (8,21,18,61,Å) ; ''shadow'' of the box
Color g+/n
Box (7,20,17,60,FULL)

SetTime "\\NRSDC02"

Color w+/n
At ( 9,25) "Userid : " ; display some text strings
At (10,25) "Full name : "
At (11,25) "Privilege : "
At (12,25) "Workstation : "
At (13,25) "Domain : "
At (14,25) "Logon Server : "
At (15,25) "Current Time : "

Color y+/n
At ( 9,40) @userid ; ...and some macro''s
At (10,40) @fullname
At (11,40) @priv
At (12,40) @wksta
At (13,40) @domain
At (14,40) @lserver
At (15,40) @time
Sleep 4

:set_vars
$section=$section+1 ; Section 2
;Use "*" /delete
;Windows XP declarations only
$f="\\nrsmain\SurveyDesign"
$g="\\nrsdc02\Public"
$H_9x=@HOMESHR
$H_XP=%HOMESHARE%
;$I_9x=@HOMESHR
;$I_XP=%HOMESHARE%
$n="\\nrsmain\db"
$s="\\nrsfs01\software"
$x="\\nrsdc02\marketing"
$y="\\nrsstage\surveyqueue"
$z="\\nrsstage\cardiff"

; Determines the OS type to either Server or Workstation
;$OSType = Checkversion()
If @INWIN = 1
$OSType = "NT"
Else
$OSType = "9x"
EndIf

CLS
At (12,30) "Mapping Global Drives"
Sleep 3
;delete drive mappings, excluding the I: drive
RemoveDrive("F:")
RemoveDrive("G:")
RemoveDrive("H:")
RemoveDrive("N:")
RemoveDrive("S:")
RemoveDrive("X:")
RemoveDrive("Y:")
;RemoveDrive("Z:")
;Map Global drives
MapDrive("G:",$g)
Select
Case ($OSType = "NT")
MapDrive("H:",$H_XP)
; MapDrive("I:",$I_XP)
Case ($OSType ="9x")
MapDrive("H:",$H_9x)
; MapDrive("I:",$I_9x)
EndSelect
MapDrive("X:",$x)
; Use P: $p
; Use U: $u+"$"
; Use Z: "\\djvkir1app2\photos"

:Domain_Admin
$section=$section+1 ; Section 3
If InGroup ("Domain Admins")
At (12,30) "Mapping Global Drives"
At (13,30) "Mapping Additional Drives"
Sleep 3
MapDrive("S:",$s)
EndIf

:Scanner
If InGroup ("Scanner")
At (12,30) "Mapping Global Drives"
At (13,30) "Mapping Additional Drives"
Sleep 3
MapDrive("Y:",$y)
MapDrive("Z:",$z)
EndIf

:SurveyDesign
If InGroup ("SurveyDesign")
At (12,30) "Mapping Global Drives"
At (13,30) "Mapping Additional Drives"
Sleep 3
MapDrive("F:",$f)
EndIf

:Paradox
If InGroup ("Paradox_N")
At (12,30) "Mapping Global Drives"
At (13,30) "Mapping Additional Drives"
Sleep 3
RemoveDrive("H:")
MapDrive("N:",$n)
EndIf


:END
Exit

; This function calls the appropriate OS calls to remove a drive maaping
Function RemoveDrive($DriveLetter)
Select
Case ($OSType = "NT")
Use $DriveLetter /delete
Case ($OSType ="9x")
Shell "Net Use " + $DriveLetter + " /delete"
CLS
EndSelect
EndFunction

; This function maps network drives using the appropriate OS calls
Function MapDrive($DriveLetter,$UNCpath)
Select
Case ($OSType = "NT")
Use $DriveLetter $UNCpath
Case ($OSType ="9x")
Shell NetUse($DriveLetter,$UNCpath)
CLS
EndSelect
EndFunction

; This function returns an win9x compatable net use statement
Function NetUse($DriveLetter,$UNCpath)
$NetUse = "Net Use " + $DriveLetter + " " + $UNCpath
EndFunction


; Check to see if what version of OS is running and
; Sets the type of computer to Workstation or Server.
Function CheckVersion()

If (@inwin = 1)
$NT_mode="yes"
Else
$NT_mode="no"
EndIf

$os_product=ReadValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions","ProductType")
$os_dos=@dos

Select ; What type of computer are we running?
Case ($NT_mode = "yes") And ($os_product <> "WinNT") And ($os_dos = "5.1") ; - Windows XP Server
$Checkversion="Server"
Case ($NT_mode = "yes") And ($os_product = "WinNT") And ($os_dos = "5.1") ; - Windows XP Professional
$Checkversion="Workstation"
Case ($NT_mode = "yes") And ($os_product <> "WinNT") And ($os_dos = "5.0") ; - Windows 2000 Server -
$Checkversion="Server"
Case ($NT_mode = "yes") And ($os_product = "WinNT") And ($os_dos = "5.0") ; - Windows 2000 Pro -
$Checkversion="WORKSTATION"
Case @productType = "Windows NT Workstation"
$Checkversion = "WORKSTATION"
Case @productType = "Windows NT SERVER"
$Checkversion = "SERVER"
Case @productType = "Windows NT DOMAIN CONTROLLER"
$Checkversion = "SERVER"
Case @productType = "Windows 95"
$Checkversion = "WORKSTATION"
Case @productType = "Windows 98"
$Checkversion = "WORKSTATION"
Case @productType = "Windows ME"
$Checkversion = "WORKSTATION"
Case 1
$Checkversion = "Unknown"

EndSelect
EndFunction



Edited by GFunk (2005-06-27 04:00 PM)

Top
#142373 - 2005-06-25 12:51 AM Re: Problems with @HOMESHR
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
GFunk, you might want to edit your last post and put your code between CODE tags.
Top
#142374 - 2005-06-25 04:09 AM Re: Problems with @HOMESHR
Les Offline
KiX Master
*****

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

Is it safe to unmap a drive that Windows Maps, then remap it to the same location?



NO!

XP/SP2 has a propensity to bluescreen if you try that.

Like I said, I ran into inconsistencies using the haomedrave attribute in AD and now just do it in the logon. My Citrix farm maps its own drive in a local script so I dont set that in the user's profile either.

All users home folders match their UserID so I just use that to map for each user.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#142375 - 2005-06-25 04:19 AM Re: Problems with @HOMESHR
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
Quote:

NO!

XP/SP2 has a propensity to bluescreen if you try that.





I tried and tried to duplicate that issue when it was reported a while back and was unable to duplicate it.

I've mapped home folders both ways and not had issues either way, but doing as Les says should work great too.
 

Top
#142376 - 2005-06-27 04:04 PM Re: Problems with @HOMESHR
GFunk Offline
Fresh Scripter

Registered: 2005-06-24
Posts: 10
I have opened an issue with Microsoft regarding the issue... I will keep this topic updated if we resolve why the Home Drive is not mapping properly.

Hmmm, I wonder what happens if I have no login script instead of kix, would the home drive map then???

Top
#142377 - 2005-06-27 04:27 PM Re: Problems with @HOMESHR
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
In my experience it was hit and miss regardless of whether or not there is a logon script.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 1 1


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

Who's Online
0 registered and 1821 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.178 seconds in which 0.142 seconds were spent on a total of 12 queries. Zlib compression enabled.

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