Greetings
I'm new to scripts and don't understand why the example below maps different items depending on its location in the script.

 Code:
Use s: /delete /persistent
Use p: /delete /persistent
Use o: /delete /persistent

If InGroup("all staff") >0
	Use s: "\\myserver\staffarea"
	ADDPRINTERCONNECTION ("\\myserver\staffprinter") 
Endif

If InGroup("all pupils") >0
	Use p: "\\myserver\pupilarea"
	ADDPRINTERCONNECTION ("\\myserver\pupilprinter") 
Endif

If InGroup("office") >0
	Use o: "\\myserver\officearea"
	ADDPRINTERCONNECTION ("\\myserver\officeprinter") 
Endif


If a user belongs to both "all staff" & "office" group they don't get both sets of mappings.
Is this easy to correct?

Is there a way that when logging onto the pc I can process/check all the commands/errors that the script runs?

Many thanks

Craig


Edited by Mart (2009-07-28 07:52 PM)
Edit Reason: Added code tags.