Jump to content

Windows 7 and RM cc4 - Pinning shortcuts through GP and login icon and username field


Recommended Posts

Posted

Hi

 

We have successfully deployed windows 7 on our network now its just the little things i am trying to figure out. Does anyone know how to set it so all users have internet explorer pinned to the task bar?

 

Also when the machines are logged out the square where you can have a picture is just blank. Is there a way to get all machines to display the same image in there? e.g. the school logo?

 

Finally when a student or staff is logged in and the computer locks there is no box to enter a username (only lets you type in a password) so that an admin cannot come along and quickly log out a teacher. Is there a way to get the username box back?

 

Thanks

  • 1 month later...
Posted (edited)

Pinning shortcuts by GPO - Officially you can't do it. This is a design decision by Microsoft to stop OEMs pre-populating pinned start menus and taskbars with crap. Unofficially, there is a workaround. You can use a login script which effectively emulates the mouse clicks and key presses which pin shortcuts. This is the one that we use:

 

Const HKEY_CURRENT_USER = &H80000001
strComputer = "."

Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
Set WshShell = WScript.CreateObject("WScript.Shell")

'Declare variables

Dim arrOfficeArray (4)
Dim strOCSIcon
Dim strCalculatorIcon
Dim strNotepadIcon
Dim i

'Declare constants
Const CSIDL_COMMON_PROGRAMS = &H17 
Const CSIDL_PROGRAMS = &H2

'Initialize variables
arrOfficeArray(0) = "Microsoft Outlook 2010.lnk"
arrOfficeArray(1) = "Microsoft Word 2010.lnk"
arrOfficeArray(2) = "Microsoft Excel 2010.lnk"
arrOfficeArray(3) = "Microsoft PowerPoint 2010.lnk"
arrOfficeArray(4) = "Microsoft OneNote 2010.lnk"
strCalculatorIcon = "Calculator.lnk"
strNotepadIcon = "notepad.exe"
strIEIcon = "iexplore.exe" 

strKeyPath = "Software\LSFC"
strValueName = "Pinned"

objRegistry.GetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue


If IsNull(dwValue) Then
'Checks for registry entry, if not there then pins shortcuts
'    Wscript.Echo "The registry key does not exist."
On Error Resume Next

'Sleep script to allow shortcuts to copy down
WScript.Sleep(500)

'Pin to taskbar - Outlook, Word, Excel, PowerPoint, OneNote, OCS
Set objShell = CreateObject("Shell.Application")
Set objAllUsersProgramsFolder = objShell.NameSpace(CSIDL_COMMON_PROGRAMS) 
Set objMyProgramsFolder = objShell.NameSpace(CSIDL_PROGRAMS) 

strAllUsersProgramsPath = objAllUsersProgramsFolder.Self.Path 
'wscript.echo("strAllUsersProgramsPath = " & strAllUsersProgramsPath)
strMyProgramsFolderPath = ("C:\ProgramData\shared start menu")
'wscript.echo("strMyProgramsFolderPath = " & strMyProgramsFolderPath)

'Pin to Start Menu and Taskbar - IE
Set objFolder = objShell.Namespace("C:\program files (x86)\Internet Explorer")
Set objFolderItem = objFolder.ParseName(strIEIcon) 
Set colVerbs = objFolderItem.Verbs 
For Each objVerb in colVerbs 
   If Replace(objVerb.name, "&", "") = "Pin to Start Menu" Then objVerb.DoIt 
Next

'Pin Windows Explorer to taskbar
Set objFolder = objShell.Namespace("C:\windows")
Set objFolderItem = objFolder.ParseName("Explorer.exe") 
Set colVerbs = objFolderItem.Verbs 
For Each objVerb in colVerbs 
   If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt 
Next

Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Microsoft Office")
For i = 0 To 2
Set objFolderItem = objFolder.ParseName(arrOfficeArray(i)) 
Set colVerbs = objFolderItem.Verbs 
For Each objVerb in colVerbs 
    If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt 
Next
Next

Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Microsoft Office")
Set objFolderItem = objFolder.ParseName(arrOfficeArray(0)) 
Set colVerbs = objFolderItem.Verbs 
For Each objVerb in colVerbs 
    If Replace(objVerb.name, "&", "") = "Pin to Start Menu" Then objVerb.DoIt 
Next


'Write registry entry to stop shortcuts being pinned again
WSHShell.RegWrite "HKEY_CURRENT_USER\Software\LSFC\Pinned", "Yes"

Else
wscript.sleep(10)
'   Wscript.Echo "The registry key exists. (" & dwValue & ")"

End If

 

That script includes code to add an entry to the registry so user removed shortcuts don't constantly get re-added on each logon.

 

I can't take credit for all of this script, I found it elsewhere (possibly even here!) and adapted it to my needs.

Edited by Norphy
Posted
Finally when a student or staff is logged in and the computer locks there is no box to enter a username (only lets you type in a password) so that an admin cannot come along and quickly log out a teacher. Is there a way to get the username box back?

 

I think you can click the username to change it, however, you can easily do it from you desk with a "logoff * /server:" command.

Posted

Redirect your desktop to a server location and put a shortcut to IE as a shortcut.

 

I will try and find where the user icon is kept we do this.

 

Richard

 

Hi

 

We have successfully deployed windows 7 on our network now its just the little things i am trying to figure out. Does anyone know how to set it so all users have internet explorer pinned to the task bar?

 

Also when the machines are logged out the square where you can have a picture is just blank. Is there a way to get all machines to display the same image in there? e.g. the school logo?

 

Finally when a student or staff is logged in and the computer locks there is no box to enter a username (only lets you type in a password) so that an admin cannot come along and quickly log out a teacher. Is there a way to get the username box back?

 

Thanks

Posted

Have a look at this to set the default user logo http://www.vistax64.com/tutorials/152658-user-logon-display-picture-set-default-all-users.html

 

Richard

 

Hi

 

We have successfully deployed windows 7 on our network now its just the little things i am trying to figure out. Does anyone know how to set it so all users have internet explorer pinned to the task bar?

 

Also when the machines are logged out the square where you can have a picture is just blank. Is there a way to get all machines to display the same image in there? e.g. the school logo?

 

Finally when a student or staff is logged in and the computer locks there is no box to enter a username (only lets you type in a password) so that an admin cannot come along and quickly log out a teacher. Is there a way to get the username box back?

 

Thanks

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...