Script to create a Windows 8 Switch User Tile for the Start menu (VBScript)

Introduction

This VBScript shows how to create a Windows 8 Switch User tile for the Start menu.

Scenarios

Switching users in Windows 8 without a Start button can be difficult. Many users may want to switch users in just one click. This script enables users to click a tile to switch user on the Start menu.

Script

Step1: Double-click CreateWindowsSwitchUserTile.vbs to run the VBScript sample. This step is shown in the following figure:


When the script is finished, a window that displays brief information about the execution result of script will appear.

The result is shown in the following figure:

 

Here are some code snippets for your references. To get the complete script sample, please click the download button at the beginning of this page. 

VB Script
Edit|Remove
Dim SwitchUserShortcutPath 
Dim objSwitchUserShortcut 
'create a new shortcut of SwitchUser 
SwitchUserShortcutPath = ProgramData & "\Microsoft\Windows\Start Menu\Programs\SwitchUser.lnk"Set objSwitchUserShortcut = objWSHShell.CreateShortcut(SwitchUserShortcutPath) 
objSwitchUserShortcut.TargetPath = SystemRoot & "\System32\tsdiscon.exe"'change the default icon of SwitchUser shortcut 
objSwitchUserShortcut.IconLocation = SystemRoot & "\System32\SHELL32.dll,264" 
objSwitchUserShortcut.Save

Prerequisite

Windows 8