title: Create shortcut files in Windows 10 using Python 3.7.1
body: <p>I found this piece of code, but it doesn't run anymore with Windows 10 and Python 3.7.1:</p>
  
  <pre><code>import win32com.client
  import pythoncom
  import os
  # pythoncom.CoInitialize() # remove the '#' at the beginning of the line if running in a thread.
  desktop = r'C:\Users\XXXXX\Desktop' # path to where you want to put the .lnk
  path = os.path.join(desktop, 'NameOfShortcut.lnk')
  target = r'C:\Users\XXXXX\Desktop\muell\picture.gif'
  icon = r'C:\Users\XXXXX\Desktop\muell\icons8-link-512.ico' # not needed, but nice
  
  shell = win32com.client.Dispatch("WScript.Shell")
  shortcut = shell.CreateShortCut(path)
  shortcut.Targetpath = target
  shortcut.IconLocation = icon
  shortcut.WindowStyle = 7 # 7 - Minimized, 3 - Maximized, 1 - Normal
  shortcut.save()
  </code></pre>
  
  <p>Is there a similar (or easier) way to create a windows shortcut?</p>