If test-path networkpath... exit script... messagebox

Could you point me out to some kickstart how i would build my script

i want installer to check network mapping > if found one “correct” G: mapping the script proceed with install > else i want exit install with messagebox saying “missing required mapping, contact servicedesk”.

Thanks!