How to Start a Horizon Session from the Taskbar or Start Menu

After earlier showing how to launch the Horizon Client to a Horizon desktop using a .bat file, Tom explores what else can be done with it.

In a previous article, I walked through how to launch the Horizon Client to a Horizon desktop using a .bat file. After writing that article, a couple of follow-on questions came to mind: Can I start a Horizon streaming application and specify a domain by using the vmware-view command? And how can I launch the .bat file from the taskbar or Start menu?

If you are not yet familiar with using the vmware-view command, I highly recommend reading the previous article mentioned above; in this article, I will only highlight the additional switches needed to launch an application and specify the user's domain with it.

To demonstrate how to start a Horizon application using a .bat file, I will show how I launched a ControlUp Console being streamed from VMware's TestDrive site. TestDrive is a sandbox service offered by VMware that allows you to work with VMware's and some of their partners' products.

Using the Horizon Client, I connected to TestDrive to see what desktops and applications were being streamed.

[Click on image for larger view.]

Being that I work for ControlUp and use TestDrive extensively, I created the .bat file listed below in the C:\Users\Fenton\Desktop\HrzCon folder so I could access it with a single double-click for demonstration purposes. I bolded the text that I added to my original command line which specifies the application and the domain for the user:

"C:\Program Files (x86)\VMware\VMware Horizon View Client\vmware-view.exe" -appName "ControlUp Console" -domainName VMWTD -userName -password users.password -desktopLayout multimonitor -monitors "2" -serverURL

This allowed me to connect to the streaming application without any issues after launching that .bat file.

Right-clicking the application icon or clicking the three dots will bring up a dialog that allows you to add it to the Start menu or create a shortcut to your desktop.

[Click on image for larger view.]

The start menu now has the icon on it.

[Click on image for larger view.]

The icon and the desktop are a shortcut to the folder C:\Users\Fenton\AppData\Roaming\Microsoft\Windows\Start Menu, which contains an internet shortcut to the streamed resource -- but it does not have the username or password in it. While this wouldn't be an issue for many users, I have so many passwords so I really like to have them preconfigured whenever possible. In order to do so, I needed to use the .bat file rather than this shortcut.

Unfortunately, when I right-clicked my .bat file, I didn't have the option to pin it to the taskbar or the Start menu. However, I was able to work around this issue by taking the steps listed below.

I right-clicked on my desktop and selected Shortcut from the New drop-down menu.

[Click on image for larger view.]

In the text box to specify the location, I entered the location of the .bat file preceded by cmd /c:

cmd /c C:\Users\Fenton\Desktop\HrzCon\ VMWTestDrive.bat
[Click on image for larger view.]

In the textbox to specify the name, I entered HRZ_TestDrive_CUp_RTC.

[Click on image for larger view.]

I could now right-click the shortcut and select Pin to Start and Pin to Taskbar.

[Click on image for larger view.]

After clicking these options, I verified that the launch icon appeared on the taskbar.

[Click on image for larger view.]

I also verified that it appeared on the Start menu.

[Click on image for larger view.]

By placing icons on my taskbar and in the Start menu, this made it possible to be automatically logged in to my Horizon desktops and streaming applications. Although it took me a little while to figure out how to do it, it was easy to set up.

About the Author

Tom Fenton has a wealth of hands-on IT experience gained over the past 30 years in a variety of technologies, with the past 20 years focusing on virtualization and storage. He currently works as a Technical Marketing Manager for ControlUp. He previously worked at VMware in Staff and Senior level positions. He has also worked as a Senior Validation Engineer with The Taneja Group, where he headed the Validation Service Lab and was instrumental in starting up its vSphere Virtual Volumes practice. He's on X @vDoppler.


Subscribe on YouTube