#162878 - 2006-06-05 03:05 PM
Need help in debugging script
|
titanax101
Fresh Scripter
Registered: 2006-06-05
Posts: 5
|
Hi,
I'm a noob...this is my 1st kixtart script. It's very simple, just drive & printer mappings...its a series of IF & ENDIF statements, but the script doens't detect any of the IF statements AFTER THE 9TH IF.
Is there some limitation on the no. of IFs I can have? I dun really want to use InGroup as there are subsets.
I'm running W2K3 server with XP clients. These are the files in my NETLOGON: KIX32.EXE WKIX32.EXE KIXTART.KIX
Code:
CLS SETTIME "\\domaincontroller" USE * /delete USE H: "\\fileserver\%username%$" USE P: "\\fileserver\PUBLIC" USE U: "\\fileserver\SUPPORT"
IF @UserId = "fred" USE O: "\\fileserver\OPERATIONS" AddPrinterConnection("\\fileserverfileserver\dc286") SetDefaultPrinter("\\fileserver\dc286") ENDIF
IF @UserId = "north_ops" USE O: "\\fileserver\OPERATIONS" AddPrinterConnection("\\fileserverfileserver\dc286") SetDefaultPrinter("\\fileserver\dc286") ENDIF
IF @UserId = "terry" USE K: "\\fileserver\NORTH" USE L: "\\fileserver\DELIVERY" USE O: "\\fileserver\OPERATIONS" AddPrinterConnection("\\fileserver\dc286") SetDefaultPrinter("\\fileserver\dc286") ENDIF
IF @UserId = "yuri" USE K: "\\fileserver\northSGDATA" USE L: "\\fileserver\DELIVERY" USE O: "\\fileserver\OPERATIONS" AddPrinterConnection("\\fileserverfileserver\dc286") SetDefaultPrinter("\\fileserver\dc286") ENDIF
IF @UserId = "wiriam" USE K: "\\fileserver\NORTH" USE L: "\\fileserver\DELIVERY" USE O: "\\fileserver\OPERATIONS" AddPrinterConnection("\\fileserver\dcc400_black") SetDefaultPrinter("\\fileserver\dcc400_black") AddPrinterConnection("\\fileserverfileserver\dc286") ENDIF
IF @UserId = "ted" USE Y: "\\fileserver\HELPDESK" USE T: "\\fileserver\NORTH" USE O: "\\fileserver\OPERATIONS" AddPrinterConnection("\\fileserver\dcc400_color") SetDefaultPrinter("\\fileserver\dcc400_color") ENDIF
IF @UserId = "michael" USE M: "\\fileserver\ADMIN" USE L: "\\fileserver\DELIVERY" USE K: "\\fileserver\NORTH" USE O: "\\fileserver\OPERATIONS" USE S: "\\fileserver\SALES" USE Y: "\\fileserver\HELPDESK" AddPrinterConnection("\\fileserver\dcc400_color") SetDefaultPrinter("\\fileserver\dcc400_color") ENDIF
IF @UserId = "maggir" USE M: "\\fileserver\ADMIN" USE L: "\\fileserver\DELIVERY" USE K: "\\fileserver\NORTH" USE O: "\\fileserver\OPERATIONS" USE S: "\\fileserver\SALES" AddPrinterConnection("\\fileserver\dc286") SetDefaultPrinter("\\fileserver\dc286") AddPrinterConnection("\\fileserver\dcc400_color") ENDIF
IF @UserId = "martin" USE K: "\\fileserver\NORTH" USE L: "\\fileserver\DELIVERY" USE O: "\\fileserver\OPERATIONS" AddPrinterConnection("\\fileserver\dcc400_black") SetDefaultPrinter("\\fileserver\dcc400_black") AddPrinterConnection("\\fileserver\dc286") ENDIF
;script doesn't detect after the 9th IF
IF @UserId = "alyson" USE K: "\\fileserver\NORTH" AddPrinterConnection("\\fileserver\dcc400_color") SetDefaultPrinter("\\fileserver\dcc400_color") ENDIF
{Edit: Allen - added code tags}
|
|
Top
|
|
|
|
#162880 - 2006-06-05 03:24 PM
Re: Need help in debugging script
|
titanax101
Fresh Scripter
Registered: 2006-06-05
Posts: 5
|
OK..thankx for the prompt reply...but I have no idea what that means!
|
|
Top
|
|
|
|
#162886 - 2006-06-05 05:02 PM
Re: Need help in debugging script
|
titanax101
Fresh Scripter
Registered: 2006-06-05
Posts: 5
|
wow...thankx a lot guys...thats so much help...& now to answer why I amo not using the Ingroup, it goes all qirky..I get users with drives they are not supposed to get..its bizarre
|
|
Top
|
|
|
|
#162887 - 2006-06-05 05:07 PM
Re: Need help in debugging script
|
titanax101
Fresh Scripter
Registered: 2006-06-05
Posts: 5
|
Quote:
If there are a large number of users, it would be better to switch over to using INI files. If every user had their own INI, you could manage things by creating/editing the INI files named after the @UserID and not have to constantly edit the script. It is too easy to fubar the script with a misplaced quote of EndIf, etc.
les, could you gimme a simple illustration?
|
|
Top
|
|
|
|
#162890 - 2006-06-06 08:45 AM
Re: Need help in debugging script
|
titanax101
Fresh Scripter
Registered: 2006-06-05
Posts: 5
|
good one les...couldn't help staring tho...had a slight epilepsy episode even!!
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1188 anonymous users online.
|
|
|