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

maxseven

Active member
Guru
VIP
Local time
4:59 PM
Messages
930
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 My Computer

At a glance

Windows 7 Professional 64bitIntel Core i7 4600M @ 2.90GHz16.0GB Dual-Channel DDR3 @ 797MHz (11-11-11-28)Intel HD Graphics 4600 (Dell) 2048MB ATI AMD ...
Computer type
Laptop
Computer Manufacturer/Model Number
Dell Latitude E6540 Laptop
OS
Windows 7 Professional 64bit
CPU
Intel Core i7 4600M @ 2.90GHz
Motherboard
Dell Inc. 0CYT5F (SOCKET 0)
Memory
16.0GB Dual-Channel DDR3 @ 797MHz (11-11-11-28)
Graphics Card(s)
Intel HD Graphics 4600 (Dell) 2048MB ATI AMD Radeon HD 8790M
Sound Card
Realtek High Definition Audio
Monitor(s) Displays
HP ZR30w (2560x1600@60Hz)
Hard Drives
256GB LITEONIT LMT-256M6M-41 mm SATA (SSD)
1TB Samsung SSD 860 EVO mSATA SATA (SSD)
2TB USB 3.0 USB Device
115GB SanDisk Ultra Fit USB
Other Info
Multiple Dell E-Port Plus II Port Replicator/Docking Stations 0Y72NH USB 3.0 + 130W AC Adapters
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 My Computer

At a glance

64-bit Windows 11 Pro for WorkstationsIntel i7-8700K OC'd to 5 GHz64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600...ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
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!!!!!!?!!!!! :cool:

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

:geek::D
 

My Computer My Computer

At a glance

Windows 7 Professional 64bitIntel Core i7 4600M @ 2.90GHz16.0GB Dual-Channel DDR3 @ 797MHz (11-11-11-28)Intel HD Graphics 4600 (Dell) 2048MB ATI AMD ...
Computer type
Laptop
Computer Manufacturer/Model Number
Dell Latitude E6540 Laptop
OS
Windows 7 Professional 64bit
CPU
Intel Core i7 4600M @ 2.90GHz
Motherboard
Dell Inc. 0CYT5F (SOCKET 0)
Memory
16.0GB Dual-Channel DDR3 @ 797MHz (11-11-11-28)
Graphics Card(s)
Intel HD Graphics 4600 (Dell) 2048MB ATI AMD Radeon HD 8790M
Sound Card
Realtek High Definition Audio
Monitor(s) Displays
HP ZR30w (2560x1600@60Hz)
Hard Drives
256GB LITEONIT LMT-256M6M-41 mm SATA (SSD)
1TB Samsung SSD 860 EVO mSATA SATA (SSD)
2TB USB 3.0 USB Device
115GB SanDisk Ultra Fit USB
Other Info
Multiple Dell E-Port Plus II Port Replicator/Docking Stations 0Y72NH USB 3.0 + 130W AC Adapters
Perfect. :party:
 

My Computer My Computer

At a glance

64-bit Windows 11 Pro for WorkstationsIntel i7-8700K OC'd to 5 GHz64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600...ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
Back
Top