metalx1000

Windows VBScript create lnk shortcut with icon

Aug 12th, 2022
495
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Set oWS = WScript.CreateObject("WScript.Shell")
  2. sLinkFile = "file.lnk"
  3. Set oLink = oWS.CreateShortcut(sLinkFile)
  4. olink.IconLocation = "C:\Windows\Installer\{AC76BA86-7AD7-FFFF-7B44-AB0000000001}\PDFFile_8.ico"
  5. oLink.TargetPath = "http://google.com"
  6. oLink.Save
  7.  
Add Comment
Please, Sign In to add comment