I currently use a batch script to mount my network shares each morning:
NET USE * /DELETE /Y NET USE Z: \\<IP>\<SHARE> <AUTHENTICATION> /persistent:no ...
Which is fine when I'm on the network, but doesn't work off-site. We have a domain which points to our public IP, and then port forwarding kicks in, so in theory, I can
NET USE * /DELETE /Y NET USE Z: \\fqdn.com\<SHARE> <AUTHENTICATION> /persistent:no ...
Except that doesnt work in the batch script or windows UI.
I'm thinking there'd be a way to get the IP of fqdn.com (which is conveniently also stored at fqdn2.com/ip.txt) but there's well outside my experience of batching.
Any input much appreciated.