Monday, December 17, 2012

Function to create File shortcut

Fn_FileShortcut()
Set WshShell=createobject(“WScript.shell”)
strDesktop=WshShell.SpecialFolders(“Desktop”)
set appConfigShortcut=WshShell.CreatShortcut(strDeskTop &  “\AppConfig.lnk”)
appConfigShortcut.TargetPath=”D:\QTP\Test.txt”
appConfigShortcut.IconLocation=”notepad.exe”
appConfigShortcut.HotKey=”CTRL+ALT+C”
appConfigShortcut.WindowStyle=1
appConfigShortcut.Description=”Application config file”
appConfigShortcut.WorkingDirectory=strDesktop
appConfigShortcut.Save

No comments:

Post a Comment