Advertisement
7_2009-2012 Files/ File Controls/ Input/ Output #238031

Create A Windows Shortcut With 9 Lines Of Code

A Function To Create Windows Shorcut .URL for hyperlinks .LNK for anything else There are many other variables that can be implemented besides just Name where it points hotkey and description

AI

ملخص الذكاء الاصطناعي: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

كود المصدر
original-source
Public Function CreateShortcut(ShortName As String, PointsTo As String, Optional HotKey As String = "", Optional Description As String = "")
  Dim WS As Object, SC As Object
  Set WS = CreateObject("Wscript.Shell")
  Set SC = WS.CreateShortcut(ShortName)
  SC.TargetPath = PointsTo
  SC.HotKey = HotKey
  SC.Description = Description
  SC.Save
End Function
التعليقات الأصلية (3)
مسترجع من Wayback Machine