Creating internet shortcuts

Richard Townsend richard at nospam.com
Mon Oct 10 17:12:54 EDT 2005


On Sun, 9 Oct 2005 23:08:45 -0400, Roger Upole wrote:

> Pythoncom doesn't directly support the necessary interfaces,
> but you can use the Shell COM interfaces to create them.
> 
> import win32com.client
> wsh=win32com.client.gencache.EnsureDispatch('wscript.shell')
> s=wsh.CreateShortcut('c:\\python.url')
> s.TargetPath='www.python.org'
> s.Save()
> 
>   hth
>       Roger
> 

Thanks Roger - that works a treat :)

-- 
Richard



More information about the Python-list mailing list