Hello magic,
If you want to pass the path to the project as an argument to the script, like:
photoscan.exe -r script.py "D:/project.psx"
Then a good option might be accessing the arguments in the script itself:
import sys
path = sys.argv[1]
doc = PhotoScan.Document()
doc.open(path)