Search code examples
pythonwindowsadvertised-shortcut

Using Python to search program installed on server


I would like to use Python to search Projectwise (a document management program). I thought this would work:

import subprocess  
subprocess.call("Projectwise.exe")  

However, it seems that Projectwise is not installed locally on my work computer. I cannot open the original file location from the shortcut. It is probably installed over all the office computers. Is it still possible to invoke Projectwise within Python?

edit: I have tried to find the application location, but the properties window doesn't show where the shortcut leads to.


Solution

  • Your problem is that the program uses an advertised shortcut. I suggest you run the application via the shortcut, and use Task Manager to find the location of the program while it is running.

    Then, use that path as the argument to subprocess.call:

    import subprocess as sp
    sp.call("C:\Path\To\Projectwise.exe")