If this is the entire script then the scrip[t window should close when it's done. You could add some error checking by looking at the contents of $rc. Anything other then 0 will indicate some kind of error.

Two comments.
-1 Deleting the O: drive before mapping it would ensure you that the correct share is mapped to the O drive. See the code below.
-2 Please use the code tags when posting code. If you put [ code ] above the code and [ /code ] below it (without the spaces) the formatting gets preserved.

 Code:
If InGroup("oracle")
	Use o: /delete /persistent
	Use o: "\\porcl\oracle"
EndIf

If InGroup("hs622_printers")
	$rc = AddPrinterConnection("\\srvprn01\hs622hp4")
	$rc = AddPrinterConnection("\\srvprn01\hs622lj4000")
	$rc = SetDefaultPrinter("\\srvprn01\hs622lj4000")
EndIf


Edited by Mart (2008-03-18 04:38 PM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.