1) %X contains the project path (\\server\directory\...)
2) https://www.originlab.com/doc/Origin-Help/XYZGridding-Method
In addition:
if you load the project from a directory on a mapped drive (not from an UNC-directory) you can list all the mapped connections by "net use" command. You can create a text file and import it to a worksheet using Labtalk:
run -ep "net use > <drive>:\<dir>\<filename.ext>"
impasc fname:="<drive>:\<dir>\<filename.ext>" ...
(you may need to set different options for correct import procedure - read the description of the "impasc"-X-function)
Then you can use the UNC path from the table instead of the corresponding drive letter, e.g.:
W: \\server1\dir1
Y: \\server2\dir2
etc.