I may have lied, I messed with this a long time and ended up putting these in 
GPO's instead of CM. I'm running it as a logon script for each user.



On Error Resume Next

Function GetOfficeVer()
On Error Resume Next
Dim ObjectWord,strVersiontemp
strVersiontemp = 0
Set ObjectWord = CreateObject("Word.Application")
strVersiontemp =  ObjectWord.Version
ObjectWord.Quit
Set ObjectWord = Nothing
GetOfficeVer = strVersiontemp


End Function



Const CSIDL_COMMON_PROGRAMS = &H17
Const CSIDL_PROGRAMS = &H2
Set objShell = CreateObject("Shell.Application")
Set objAllUsersProgramsFolder = objShell.NameSpace(CSIDL_COMMON_PROGRAMS)
strAllUsersProgramsPath = objAllUsersProgramsFolder.Self.Path


Set objACCFolder = objShell.Namespace(strAllUsersProgramsPath & "\Accessories")
Set objOFFFolder = objShell.Namespace(strAllUsersProgramsPath & "\Microsoft 
Office")
Set objRootFolder = objShell.Namespace(strAllUsersProgramsPath & "\")

If GetOfficeVer = "12.0" then


Set objRootFolder2 = objRootFolder.ParseName("Windows Media Player.lnk")
Set colROOTVerbs2 = objRootFolder2.Verbs
For Each objVerb in colROOTVerbs2
    If Replace(objVerb.name, "&", "") = "Unpin this program from taskbar" Then 
objVerb.DoIt
Next

Set objOFFFolder1 = objOFFFolder.ParseName("Microsoft Office Outlook 2007.lnk")
Set colOFFVerbs1 = objOFFFolder1.Verbs
For Each objVerb in colOFFVerbs1
    If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
Next

Set objOFFFolder1 = objOFFFolder.ParseName("Microsoft Office Word 2007.lnk")
Set colOFFVerbs1 = objOFFFolder1.Verbs
For Each objVerb in colOFFVerbs1
    If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
Next

Set objOFFFolder1 = objOFFFolder.ParseName("Microsoft Office Excel 2007.lnk")
Set colOFFVerbs1 = objOFFFolder1.Verbs
For Each objVerb in colOFFVerbs1
    If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
Next

End if


If GetOfficeVer = "13.0" then



Set objRootFolder2 = objRootFolder.ParseName("Windows Media Player.lnk")
Set colROOTVerbs2 = objRootFolder2.Verbs
For Each objVerb in colROOTVerbs2
    If Replace(objVerb.name, "&", "") = "Unpin this program from taskbar" Then 
objVerb.DoIt
Next

Set objOFFFolder1 = objOFFFolder.ParseName("Microsoft Outlook 2010.lnk")
Set colOFFVerbs1 = objOFFFolder1.Verbs
For Each objVerb in colOFFVerbs1
    If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
Next

Set objOFFFolder1 = objOFFFolder.ParseName("Microsoft Word 2010.lnk")
Set colOFFVerbs1 = objOFFFolder1.Verbs
For Each objVerb in colOFFVerbs1
    If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
Next

Set objOFFFolder1 = objOFFFolder.ParseName("Microsoft Excel 2010.lnk")
Set colOFFVerbs1 = objOFFFolder1.Verbs
For Each objVerb in colOFFVerbs1
    If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
Next

End if





From: [email protected] [mailto:[email protected]] On 
Behalf Of Burke, John
Sent: Monday, March 17, 2014 7:15 PM
To: [email protected]
Subject: [MDT-OSD] RE: populate or pin to taskbar for all users

windows 7 64bit.

________________________________
From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Marcum, John
Sent: Monday, March 17, 2014 11:29 AM
To: [email protected]<mailto:[email protected]>
Subject: [MDT-OSD] RE: populate or pin to taskbar for all users
Windows 7 or 8? I have a script to do it for 7.

From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Daniel Ratliff
Sent: Monday, March 17, 2014 9:26 AM
To: [email protected]<mailto:[email protected]>
Subject: [MDT-OSD] RE: populate or pin to taskbar for all users

I spent a good week trying to get a PowerShell script working to do this and 
gave up. It is very flaky and only works for certain file types (.exe I think). 
My testing wasn't in a base image to set for default user but a script I could 
run to 'configure the desktop' and pinning to the start menu or the task bar 
was a major pain.

Daniel Ratliff

From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Burke, John
Sent: Monday, March 17, 2014 10:18 AM
To: [email protected]<mailto:[email protected]>
Subject: [MDT-OSD] populate or pin to taskbar for all users

Hi folks,

I've been asked to throw some icons on the taskbar for users because they are 
locking down everyones ability to pin themselves.

I thought this would be super easy, and assumed i could just throw some icons 
into the pinned folder for the default user but when i got googling, it seems 
more complicated.

Questions - Why can't we set it up for default user and that create it for any 
new users?

Question 2. how are you dealing with this?

The information transmitted is intended only for the person or entity to which 
it is addressed
and may contain CONFIDENTIAL material. If you receive this material/information 
in error,
please contact the sender and delete or destroy the material/information.
________________________________

Confidentiality Notice: This e-mail is from a law firm and may be protected by 
the attorney-client or work product privileges. If you have received this 
message in error, please notify the sender by replying to this e-mail and then 
delete it from your computer.

________________________________

Confidentiality Notice: This e-mail is from a law firm and may be protected by 
the attorney-client or work product privileges. If you have received this 
message in error, please notify the sender by replying to this e-mail and then 
delete it from your computer.

________________________________

Confidentiality Notice: This e-mail is from a law firm and may be protected by 
the attorney-client or work product privileges. If you have received this 
message in error, please notify the sender by replying to this e-mail and then 
delete it from your computer.

________________________________

Confidentiality Notice: This e-mail is from a law firm and may be protected by 
the attorney-client or work product privileges. If you have received this 
message in error, please notify the sender by replying to this e-mail and then 
delete it from your computer.

Reply via email to