Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Shortcut Icon

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,62128
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Shortcut Icon
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Shortcut Icon - 7/2/2008 11:39:27 AM   
  patgenn123

 

Posts: 37
Score: 0
Joined: 1/14/2008
Status: offline
I looked at this post http://www.visualbasicscript.com/m_42836/mpage_1/key_icon/tm.htm#42838.  I was able to create a desktop Folder called "New Folder" and then create a shortcut called "it"(as in just for the heck of it) and it worked!

I would like to now change the plain old yellow folder icon (in the Quick Launch Folder)  to something else.  I looked at the above link and tried to get it to work, but for some reason I am getting the error:

---------------------------
Windows Script Host
---------------------------
Script: C:\Documents and Settings\Pat\Desktop\Shortcut to Quicklaunch.vbs
Line: 15
Char: 1
Error: Object required: 'objFolder'
Code: 800A01A8
Source:  Microsoft VBScript runtime error
---------------------------
OK  
---------------------------
Here is the script:

Set objShell = CreateObject("WScript.Shell")
Set colEnvironmentVariables = objShell.Environment("Volatile")

strFolder = colEnvironmentVariables.Item("APPDATA") & _
"\Microsoft\Internet Explorer\Quick Launch"

Set objShortCut = objShell.CreateShortcut(strFolder & _
"\it.lnk")

objShortCut.TargetPath = "C:\Documents and Settings\Pat\Desktop\New Folder"
objShortCut.HotKey = "Ctrl+Shift+N"

Set objFolderItem = objFolder.ParseName("Shortcut to it.lnk")
Set objShortcut = objFolderItem.GetLink

objShortcut.SetIconLocation "F:\Favorites\Personal Folders\Computer\Logos and Icons\95cal.ico", "0"
objShortcut.Save



What am I missing to make this work?

Thanks!

Pat
 
 
Post #: 1
 
 RE: Shortcut Icon - 7/3/2008 12:18:23 AM   
  ebgreen


Posts: 4613
Score: 31
Joined: 7/12/2005
Status: offline
Set objFolderItem = objFolder.ParseName("Shortcut to it.lnk"

You never create the objFolder object.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to patgenn123)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Shortcut Icon Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts