Create these three files on the desktop, with notepad. Run note.vbs, click
the created shortcut after remembering the shortcut icon created, run the
shortcut, and notice the changed icon as the text file has opened. To start
over, run note.vbs again.
---note.vbs--
set WshShell = WScript.CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop")
set oShellLink = WshShell.CreateShortcut(strDesktop & "\Shortcut
Script.lnk")
oShellLink.TargetPath = "my.vbs"
oShellLink.WindowStyle = 1
oShellLink.Hotkey = "CTRL+SHIFT+F"
oShellLink.IconLocation = "notepad.exe, 1"
oShellLink.Description = "Shortcut Script"
oShellLink.WorkingDirectory = strDesktop
oShellLink.Save
--end file--
---my.vbs--
set WshShell = WScript.CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop")
set oShellLink = WshShell.CreateShortcut(strDesktop & "\Shortcut
Script.lnk")
oShellLink.TargetPath = "my.txt"
oShellLink.WindowStyle = 1
oShellLink.Hotkey = "CTRL+SHIFT+F"
oShellLink.IconLocation = "notepad.exe, 0"
oShellLink.Description = "Shortcut Script"
oShellLink.WorkingDirectory = strDesktop
oShellLink.Save
WshShell.run "notepad my.txt"
--end file--
---my.txt--
Hi mom.
--end file--
Running note.vbs 'resets' the icon, running the icon to open the file,
changes the shortcut icon. Edit the target for my.vbs. Edit my vbs to run
any file. Add to Note.vbs to create more.
--
Was this helpful? Then click the "Yes" Ratings button. Voting helps the web
interface.
http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPost
Mark L. Ferguson
..