Advertisement
Guest User

Untitled

a guest
Feb 10th, 2013
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.56 KB | None | 0 0
  1. import os, winshell
  2.  
  3. from win32com.client import Dispatch
  4.  
  5. desktop = winshell.desktop()
  6.  
  7. path = os.path.join(desktop, "Mozilla Firefox.lnk")
  8. target = r'C:\Program Files (x86)\Mozilla Firefox\firefox.exe'
  9. wDir = r'C:\Program Files (x86)\Mozilla Firefox'
  10. icon = r'C:\Program Files (x86)\Mozilla Firefox\firefox.exe'
  11. description = "I am a teapot"
  12.  
  13. shell = Dispatch('WScript.Shell')
  14. shortcut = shell.CreateShortCut(path)
  15. shortcut.Targetpath = target
  16. shortcut.WorkingDirectory = wDir
  17. shortcut.IconLocation = icon
  18. shortcut.Description = description
  19.  
  20. shortcut.save()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement