Page 1 of 1 1
Topic Options
#135536 - 2005-03-15 03:23 AM Script Runs - will not map drives
ScriptIt Offline
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
#135537 - 2005-03-15 04:16 AM Re: Script Runs - will not map drives
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
See the FA Forum for Window 9x support, the KXRPC Server, and the various login batch files that have been posted over the years to ensure that a) the script is being called correctly and b) all necessary information is available to KiXtart.

Edited by sealeopard (2005-03-16 12:45 AM)
_________________________
There are two types of vessels, submarines and targets.

Top
#135538 - 2005-03-15 04:17 AM Re: Script Runs - will not map drives
Jose Offline
Seasoned Scripter
*****

Registered: 2001-04-04
Posts: 693
Loc: Buenos Aires - Argentina
Sup ScriptIt welcome.

It is not very clear what is happening to you.


Quote:


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?





You mean that on 9x drives are mapped when it runs localy?


_________________________
Life is fine.

Top
#135539 - 2005-03-15 03:49 PM Re: Script Runs - will not map drives
ScriptIt Offline
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
#135540 - 2005-03-15 06:43 PM Re: Script Runs - will not map drives
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Could you post the script here?
Much easier to find the bug if we can see the script.


Edited by R2D2 (2005-03-15 06:43 PM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#135541 - 2005-03-16 12:46 AM Re: Script Runs - will not map drives
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
How do you know that the MAPDRIVE.KIX script runs on Windows 9x?
_________________________
There are two types of vessels, submarines and targets.

Top
#135542 - 2005-03-16 04:18 AM Re: Script Runs - will not map drives
ScriptIt Offline
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 Offline
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
#135544 - 2005-03-16 04:53 AM Re: Script Runs - will not map drives
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
You can't map a Z drive during logon with Windows 9x

Change the drive letter to something else and it should work.

The network redirector is using the Z: drive during the logon process. After logon you can use Z: on Windows 9x but not during.

Top
#135545 - 2005-03-16 09:33 AM Re: Script Runs - will not map drives
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
not sure he did se anything like that doc...
_________________________
!

download KiXnet

Top
#135546 - 2005-03-16 11:58 AM Re: Script Runs - will not map drives
ScriptIt Offline
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
#135547 - 2005-03-16 12:18 PM Re: Script Runs - will not map drives
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Like said this is normal on Win9x.
It uses the z drive at logon and releases it when logon is done.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#135548 - 2005-03-16 03:41 PM Re: Script Runs - will not map drives
ScriptIt Offline
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
#135549 - 2005-03-16 04:09 PM Re: Script Runs - will not map drives
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so, to go on and really know what's going wrong you need to really debug it.

at the start of the script:
"Hello, we have started" ? sleep2

and then after each map:
"we mapped drive j: to \\server\share with error of: " @error ? sleep 2

I think this type of simple debug gives you the best results and you can end quessing what might be wrong.
_________________________
!

download KiXnet

Top
#135550 - 2005-05-18 11:50 AM Re: Script Runs - will not map drives
piotrb Offline
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
#135551 - 2005-05-19 04:22 AM Re: Script Runs - will not map drives
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
1. is not correct. While it is definitely advantageous to have the login script in the NETLOGON share with replication enabled, it is not a necessity. The executables just have to reside in a location where every client can access the files.

The FAQ Forum has extensive articles on how to implement a KiXtart login script. Also, samples batch files have been posted as well. One should start with the most basic script, then expand the functionality.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


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

Who's Online
0 registered and 1636 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.073 seconds in which 0.029 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