Windows.XP.in.a.Nutshell.1002005.2Ed [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Windows.XP.in.a.Nutshell.1002005.2Ed [Electronic resources] - نسخه متنی

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید







9.10. Shortcuts


The Shell object
provides the ability to create shortcuts via the
CreateShortCut method. This method returns a
WshShortCut object:

objShortCut = objShell.CreateShortcut(strPath)

Once you have created a
Shortcut object, you can set properties for it.
This object provides the same settings that are available when
creating shortcuts using Explorer.

Table 9-10 lists the properties that can be set for
the shortcut.

Table 9-10. Shortcut object properties

Parameter


Type


Description


Description


String


Shortcut description.


Hotkey


String


Hotkey used to execute shortcut. The easiest way to get a hotkey is
to use Windows Explorer to create a shortcut and copy the hotkey
settings used by the shortcut.


IconLocation


String


Path to file containing icons to use in shortcut.


TargetPath


String


Path of the application or document to execute.


WindowStyle


Integer


Type of Window to display application in. 1 for normal, 2 for
minimized, and 3 for maximized Window.


WorkingDirectory


String


Default working directory for application to use.

Once you have set the parameters for the shortcut, invoke the
Save method to save and update the shortcut.

'create a shortcut on desktop linked to hello script
Set objShell = CreateObject("Wscript.Shell")
strDesktop = objShell.SpecialFolders("Desktop") 'get path to desktop
Set objShortcut = objShell.CreateShortcut(strDesktop & "\nlink.lnk")
objShortcut.TargetPath = "D:\heh.vbs" 'script to execute
objShortcut.Save 'save and update shortcut


/ 239