Hi all,

I am having some trouble with the script below and need some help. Sometimes it works fine and sometimes it doesn't. It has something to do with the /f switch or with something in GPO. I don't use GPO for login scripts but what is happening is sometimes the INGROUP commands will not
function when the user logs on. Locally on the PC I have ran the kix32.exe /f \\10.10.22.11\netlogon new.kix (syntax might be wrong) successfully and then boom, the drive mappings show up, then I go to another pc, login as the same user and get no mappings. I tried adding the /f to the login script but apparently it only works if ran locally. Any suggestions as to why the script works sometimes but not others..

Thanks guys,

Greg


This is my batch file...
 Code:
:
@echo off
cls

:START
echo.
echo Logging on to IMO.INT - 

echo ### Removing Existing Mappings ###

net use g: /delete
net use p: /delete
net use r: /delete
net use h: /delete

echo ### Installing Printers ###

rundll32 printui.dll,PrintUIEntry /in /q /n \\newfs01\bwcanon
rundll32 printui.dll,PrintUIEntry /in /q /n \\newfs01\colorcanon


If Not Exist %Windir%\Kix32.exe Goto InstallKix
If Not Exist %Windir%\UpgradeKix.Chk Goto Onsite
Attrib -R %Windir%\Kix32.exe
Del "%Windir%\UpgradeKix.Chk"

:InstallKix
Echo.
Echo Updating the logon script processor. Please wait..
copy %logonserver%\netlogon\kix\*.*  %windir%\*.* >nul 

:Onsite
%windir%\kix32.exe %logonserver%\netlogon\new.kix
goto exit


:EXIT
Exit


My Kix script

 Code:
;*******************************************
;Show welcome splash
;*******************************************

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

Color w+/n
AT (10,30) "Welcome to the,"
AT (12,30) @domain
AT (12,39) "domain"
AT (14,30) @fullname
SLEEP 1
CLS
Color g+/n
? "Today is " + @DAY + ", " + @MONTH + " " + @MDAYNO + ", " @YEAR + "."
? "Processing login, please wait..."

:DRIVEMAP
;**********
;Begin Group-Based Mappings

IF INGROUP("NEWGROUPS")
	USE P: /DELETE
	USE P: "\\NEWFS01\GROUPS"
	USE H: /DELETE
	USE H: "\\NEWFS01\USERS\%USERNAME%"
	
ENDIF


;**********

IF INGROUP("NEWBARRYROSS")
	USE R: /DELETE
	USE R: "\\NEWFS01\npd"
	
ENDIF

;**********




Edited by Allen (2007-07-23 07:25 AM)
Edit Reason: added code tags