Perhaps none of the groups are being detected, and it's simply setting the default according to the Case 1 which also happens to be the same as PRT01. I would recommend changing the Case 1 line to the other printer just as a test to see if you get different results.

 Code:
Case 1 ;default - wenn keine andere option zutrifft
	
			$ = SetDefaultPrinter("\\srv01\PRT02 HP LaserJet P3015")