VMware Horizon Community
onfire247
Enthusiast
Enthusiast

VBS Script Taskbar Icon Pinning Failure In A Linked Clone Environment

Infrastructure Information:

ESXi 5.0

vSphere 5.0.0 B804277

View 5.1.0 B704644

Agent 5.1.2

Linked clone with persistent disks running Windows 7 Pro.

I am running a linked clone setup with persistent disks. In order to give all users the same taskbar appearance, I use a simple VBS script (see attachment). This script removes all existing pinned icons, and then adds the pinned icons I want showing on the taskbar. Once the script is done, it deletes itself. It is launched from the registry (HKLM\Software\Microsoft\CurrentVersion\Run) through a simple run command on boot. The file is designed to run itself after every recompose, at which point it deletes itself and gets ignored until the next recompose. I have been running this file on my faculty gold for two years without a hitch.

For this latest recompose, I took my gold from zero Windows updates to all of them, upgraded from IE9 to IE10, and added Chrome. Once these features were added, I copied the VBS script to its default location in the root of C: and ran Sysprep, which basically copies the existing profile to the default profile. After every Sysprep, I create a dummy account named Bob. When I logged into Bob, the icons were removed and the new ones were added to the taskbar, and the file deleted itself just like normal. I buttoned up my image and pushed it to a test pool. In the test pool, the icons do not change, but the file does delete itself. I verified that I did indeed copy the file to the correct location by booting up the gold image and watching as the icon process completed.

I have verified the file is functional. For example, if I manually launch the file, it removes and adds the icons and deletes itself. If I copy the file to the root of C: and logout, the icons will once again change and the file will successfully delete itself upon login. Additionally, whenever the file is tested on the gold itself, it runs 100% of the time. There is something within the linked clone creation process, or the Windows first boot process, that is stopping the pinning operation from completing. It can’t be a permissions issue as all users are admins, and the UAC is turned off. I don’t think it is a resource competition issue, as my tasks look normal immediately after first login. I've tested after every program to see if one specific upgrade is breaking it with no luck.

Any suggestions on what might be breaking this?

0 Kudos
3 Replies
elgwhoppo
Hot Shot
Hot Shot

Pinning icons to the taskbar is pretty annoying, agreed. Does your script work when you run it in a View VM post logon? Are you using quickprep or Sysprep?

Rather than worrying about the sysprep process, I'd just take care of it after the fact. Use GPO extensions if available, and/or a logon script to ensure your config is correct no matter what the default profile builds. Here's a good article. You can likely modify your script to run at logon in user context.

Forum FAQ: How to deploy Windows 7 Taskbar Pinned Icons by Group Policy?

VCDX-Desktop
0 Kudos
onfire247
Enthusiast
Enthusiast

Thanks for the reply.

The file will run post logon if I manually execute it and it performs like normal. During the clone process I am using quickprep. The only time I use Sysprep is for copying my default profile prior to cloning.

I've looked at the linked page, and I may consider going to something like that if I can't find a solution. I'm really hoping I can figure out why this has worked for two years and is not now.

0 Kudos
elgwhoppo
Hot Shot
Hot Shot

Yep, default profiles are a PITA. Ultimately I end up having this discussion with every customer, how to control the default user experience, whether in the gold, with group policy, with a profile management tool or a combination of all. Group policy is my favorite method, just because it's trackable and free. Next up is third party profile management.

VCDX-Desktop
0 Kudos