Skip to content

Instantly share code, notes, and snippets.

View itguy51's full-sized avatar

Rebecca Pruim itguy51

  • San Diego, California
View GitHub Profile
@itguy51
itguy51 / pin.vbs
Created July 13, 2015 14:31
VBScript to config pinned items.
Const CSIDL_COMMON_PROGRAMS = &H17
Const CSIDL_PROGRAMS = &H2
Const OfficeDir = "Microsoft Office"
Set objShell = CreateObject("Shell.Application")
Set objAllUsersProgramsFolder = objShell.NameSpace(CSIDL_COMMON_PROGRAMS)
strAllUsersProgramsPath = objAllUsersProgramsFolder.Self.Path
Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\" & OfficeDir)
Set startFldr = objShell.Namespace(strAllUsersProgramsPath)
Set accFldr = objShell.Namespace(strAllUsersProgramsPath & "\Accessories")