[python-win32] shortcut creation during installation
mhammond at skippinet.com.au
Thu Sep 16 01:13:29 CEST 2004
> The first link try to launch python with a script as
> argument, so values are :
> and finally
> This creates a link but when it is activated, it tells
> "C:\Python23\python.exe is not a valid Win32 application."
> This sounds like the problem is coming from the file
> C:\Python23\python.exe and not from the shortcut I just
> create. Is something wrong with the way I make the link ?
That looks fine to me, so I am surprised. Did you try looking at the link
properties in Windows, and seeing what they said? Try getting the link to
work from windows to see what went wrong and transfer that back to the code.
Also, look for win32com\shell\test\link.py - it creates links from "first
> My second link starts Acrobat reader with a file as argument.
> This time, values are :
> "C:\\Program Files\\Adobe\\Acrobat 5.\\Acrobat",
> This works fine! :)
> But my path to acrobat reader (i.e. in target) may not be the
> same for an other windows user.
> Is there a way to find the path to the executable of a
> program ? (something similar to get_special_folder_path ...)
I vaguely recall you can just set the path to the PDF - and Windows takes
care of the rest. If not, win32api.FindExecutable is what you need.
More information about the Python-win32