"Stanislaw Findeisen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Does anyone know how to create file shortcuts in Windows? > > The only way I know is like: > > --------------------------------------------------------------- > > import win32com.client > > wScriptShellObject = win32com.client.Dispatch("WScript.Shell") > shortcutName = unicode("shortcut.lnk", "utf8") > shortcut = wScriptShellObject.CreateShortcut(shortcutName) > shortcut.TargetPath = <FULL PATH TO TARGET FILE> > shortcut.Save() > > ---------------------------------------------------------------
I see that another way is available here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_int/shell_int_programming/shortcuts/shortcut.asp I haven't tried, and I don't have the knowledge to convert the C++ to Python, but it works at a lower level and may get around the bugs. It does seem that the name of the file isn't Unicode in their method, either, so I'm not sure if it'll work. -- http://mail.python.org/mailman/listinfo/python-list