#135536 - 2005-03-15 03:23 AM
Script Runs - will not map drives
|
ScriptIt
Fresh Scripter
Registered: 2005-03-15
Posts: 7
|
Hi. I'm running a script to map drives based on group assignment. works great on w2k or better. On win9x, the script runs, but no drives will map. However, when I log into the 9x station, the drives map. What gives? Any ideas? The login.cmd file calls \\servername\sharename\kix32.exe filename.kix . Filename.kix simply calls a file called drivemaps.kix which includes only IF INGROUP("domain\group") use ... statements.
any ideas would be appreciated. kd
|
|
Top
|
|
|
|
#135539 - 2005-03-15 03:49 PM
Re: Script Runs - will not map drives
|
ScriptIt
Fresh Scripter
Registered: 2005-03-15
Posts: 7
|
To clarify, I am running a login.bat file which simply senses the os and then runs a mapdrive.kix file which maps drives based on group assignment. All files - kix32.exe, the 95 dll's are on the sysvol of all domain controllers. The kixrpc service is running on all domain controllers. The script works fine for all w2k and up clients. However, on 95 clients, the script rightly senses the os, runs the appropriate files including the mapdrive.kix file, but drives do not map. However, once logged into the 95 client, if I run the exact command, i.e., \\servername\sharename\kix32.exe mapdrive.kix, the drives map correctly. Help!! Thanks.
|
|
Top
|
|
|
|
#135542 - 2005-03-16 04:18 AM
Re: Script Runs - will not map drives
|
ScriptIt
Fresh Scripter
Registered: 2005-03-15
Posts: 7
|
Well I guess I'm assuming for two reasons. I can watch the command window as the script is running and can see the line which calls the mapdrive.kix file with no error. But that is an assumption. ALSO, when I run the script after logging into the 98 pc the script runs with no issues. Here's my scripts - forgive, the're pretty hacked up at this point. LOGIN2.bat REM @echo off Rem Branched startup script for Kixtart. Rem Windows XP drops all parameters after EXE if %0 is used. Rem %0\..\ is only required for Windows 95, 98, and Me. Rem Detect OS (NT or other) if (%OS%) == (Windows_NT) goto NT_XP
goto cont9x
REM **** this is the win9x section ******
:cont9x REM ECHO Checking for Windows Terminal Server session REM if not "%SESSIONNAME%" == "" goto :metaframe9x REM if not "%WINSTATIONNAME%" == "" goto :metaframe9x
echo TermServe 9x login script is executing
REM \\cluster_01\util$\kix32.exe %1 mapdrives.kix REM \\cluster_01\util$\kix32.exe %1 %0\..\mapdrives.kix \\cluster_01\util$\kix32.exe mapdrives.kix goto :exit
:NT_XP ECHO Checking for Windows Terminal Server session if /i "%SESSIONNAME%" == "Console" goto :cont if not "%SESSIONNAME%" == "" goto :metaframe if not "%WINSTATIONNAME%" == "" goto :metaframe
:cont
REM Get SRVINFO.EXE from w2k resource kit REM "%0\..\SRVINFO.EXE" > NUL REM if errorlevel 4 goto :exit
ECHO WinNT_2k Login Script Running title Please Wait - WinNT_2k Logon Running \\cluster_01\util$\kix32.exe \\cluster_01\util$\mapdrives.kix goto :exit
:metaframe
REM Get SRVINFO.EXE from w2k resource kit REM "%0\..\SRVINFO.EXE" > NUL REM if errorlevel 4 goto :exit
ECHO TermServ Login Script Running title Please Wait - TermServ Logon Running \\cluster_01\util$\kix32.exe \\cluster_01\util$\termserv.kix goto :exit
:exit ******************
Mapdrives.kix contains a bunch of these:
If InGroup("domain\ABC Users") use j: "\\ServerName\ShareName$" EndIf
|
|
Top
|
|
|
|
#135543 - 2005-03-16 04:26 AM
Re: Script Runs - will not map drives
|
ScriptIt
Fresh Scripter
Registered: 2005-03-15
Posts: 7
|
One other note, when I use the %0\..\kix.exe %0\..\mapdrive.kix syntax, I see something like z:\sharename\mapdrives.kix in the command window. Thanks.
|
|
Top
|
|
|
|
#135546 - 2005-03-16 11:58 AM
Re: Script Runs - will not map drives
|
ScriptIt
Fresh Scripter
Registered: 2005-03-15
Posts: 7
|
I'm not using the 0\.. I mention this only for additional info. My point here is that when I tried that syntax, somewhere?? the system applied the z: drive to that syntax.
|
|
Top
|
|
|
|
#135548 - 2005-03-16 03:41 PM
Re: Script Runs - will not map drives
|
ScriptIt
Fresh Scripter
Registered: 2005-03-15
Posts: 7
|
Right, so I know the 0\.. does not work so I am not using it. I am using direct paths instead. Still does not work. Any ideas on what I'm doing wrong?
|
|
Top
|
|
|
|
#135550 - 2005-05-18 11:50 AM
Re: Script Runs - will not map drives
|
piotrb
Fresh Scripter
Registered: 2005-05-18
Posts: 11
Loc: Poland
|
Hello IMO this is problematic line: \\cluster_01\util$\kix32.exe mapdrives.kix 1. kix32 must be on "netlogon" share on every logonserver in domain (I use replication)! 2. try use batch. Add line: call %0\..\mapdrives.bat Put this to this batch: %0\..\kix32.exe mapdrives.kix Maybe this help
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1452 anonymous users online.
|
|
|