A couple things come to mind why you might have an issue with the net use command
- you are assuming the user has access to the administrative shares. By default this is an admin only share.
- You are assuming the shares are enabled. If the administrative share was turned off, this wont work.
- You are assuming networking itself is properly working. Its possible that networking could be broken, localhost is redirected somewhere else, etc..
These scenarios arent likely, but could happen.
Using the net use command is taking unnecessary steps that would be avoided with psubst.