any way to pin .vbs such that the icon is retained?


  1. Posts : 880
    Windows 7 Professional 64bit
       #1

    any way to pin .vbs such that the icon is retained?


    Since you bumped this ancient thread I have to ask a related question:

    I made a custom iTunes.VBS which in turn calls a RuniTunes.bat. I did this in order to Start and Stop Bonjour service which otherwise finds unusual times to load-up my event log with errors.

    Both of these are at C:\, and when I try to pin the iTunes.VBS to the Taskbar, I can't make it do so with a custom icon e.g. the iTunes icon, it only gets a "Microsoft Windows Based Script Host" icon which I can't seem to change. Does anyone know how to make this work?

    FWIW the .VBS I run looks like this:

    Code:
    Set WshShell = CreateObject("WScript.Shell")
    WshShell.Run chr(34) & "C:\RuniTunes.bat" & Chr(34), 0
    Set WshShell = Nothing
    the the RuniTunes.bat is this:

    Code:
    net start "Bonjour Service"
    net start "iPod Service"
    
    "C:\Program Files\iTunes\iTunes.exe"
    
    net stop "iPod Service"
    net stop "Bonjour Service"
    By this method I avoid having a cmd.exe window when I launch, and of course the services are started with iTunes and stopped again when I quit iTunes.

    I currently have a shortcut to the C:\iTunes.VBS file sitting on my Desktop, with the nice, pretty iTunes icon having set Change icon in Properties. But now any way to pin it such that the icon is retained?
      My Computer


  2. Posts : 72,051
    64-bit Windows 11 Pro for Workstations
       #2

    Hello maxseven, :)

    You could add "explorer" in front of the target path of the shortcut to be able to "Pin to taskbar", but you'll need to change the icon of the shortcut again afterwards first.

    For example: explorer C:\iTunes.VBS
      My Computer


  3. Posts : 880
    Windows 7 Professional 64bit
    Thread Starter
       #3

    Brink said:
    Hello maxseven, :)

    You could add "explorer" in front of the target path of the shortcut to be able to "Pin to taskbar", but you'll need to change the icon of the shortcut again afterwards first.

    For example: explorer C:\iTunes.VBS
    Brink that is brilliant! Where do you learn such things!!!!!!?!!!!!

    I did not have to change the icon--it just worked. THANK YOU!!!

      My Computer


  4. Posts : 72,051
    64-bit Windows 11 Pro for Workstations
       #4

    Perfect.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 01:08.
Find Us