Create/Edit Win32 Shortcuts?

waldekO osuchw at ecn.ab.ca.remove_me
Thu Apr 19 00:32:28 EDT 2001


What I used to do is to create Shell object using COM package and utilize
its methods to do the job.
for example:
from win32com.client import Dispatch
>>> shell = Dispatch('WScript.Shell')
>>> lnk = shell.CreateShortcut('c:\\windows\\desktop\calc.lnk')
>>> lnk.TargetPath = 'c:\\windows\\calc.exe'
>>> lnk.Save()
For details of all parameters refer to Microsoft Windows Scripting Host
documentation.

waldekO

Don Tuttle <tuttledon at hotmail.com> wrote in message
news:HLkD6.3016$481.1337066 at typhoon.southeast.rr.com...
> I can't believe that Python doesn't have the ability to create/edit Win32
> shortcuts (.lnk files). But after an hour of searching the archives and my
> books I can't find anything at all.  Would someone point me in the right
> direction?
>
> Don
>
>
>





More information about the Python-list mailing list