Excluding XP Start Menu pinned items from roaming profile

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I am using Windows 2003 server with multiple XP workstations. I have a roaming profile setup that I use on two machines at once, almost 24/7, since it is nice to have things synched - except that I have very different programs installed on each. I am not sure where the list of pinned shortcuts in the XP start menu are stored, but they are migrated with the roaming profile. Does anyone know of a way to stop this from transfering, or at least updating?
 
Hello Morquan.

Yes. You may want some shortcuts to roaming, and some not, that belongs to
each machine yes.

There is a All Users Profile, the All Users Profile will never romaing, so
the only way i see to keep some shortcuts away from you roaming profile is
to place them for exempel in

%SystemDrive%\Documents and Settings\All users\Dekstop.

Well this shortcuts will shown up for each user on this machine. So this may
not are the solution of your problem.



--
// Christoffer Andersson
Morquan said:
Hi, I am using Windows 2003 server with multiple XP workstations. I have a
roaming profile setup that I use on two machines at once, almost 24/7, since
it is nice to have things synched - except that I have very different
programs installed on each. I am not sure where the list of pinned shortcuts
in the XP start menu are stored, but they are migrated with the roaming
profile. Does anyone know of a way to stop this from transfering, or at
least updating?
 
I don't mean the shortcuts under the programs menu, I mean the pinned items in the left column. Thanks anyway.
 
Sorry Morquan i didn't understand the question.

How do I remove the frequently used programs area from the Windows XP Start
menu:
http://www.jsiinc.com/SUBL/tip5700/rh5776.htm

This setting allows you to decide which programs may be shown in the most
frequently used programs list on the Windows Start menu:
http://www.winguides.com/registry/display.php/1134/

--
// Christoffer Andersson


Morquan said:
I don't mean the shortcuts under the programs menu, I mean the pinned
items in the left column. Thanks anyway.
 
Perhaps the following will help. I am not a scripting guy but you may be
able to test to figure it out:




Use the Shell object and use the "Pin to Start Menu" verb to achieve the
result. Below is a sample code that should work on a genric case. One more
thing I notice was that the Pinned items are per user and not global.

Public objShell 'As New WshShell
Public objShell32 'As New Shell32.Shell
Public strStartMenuFolderPath 'As String
const ssfCOMMONSTARTMENU = 22


Call Main()







'********************
' Main *
'********************

Sub Main()

Set objShell = CreateObject("Wscript.Shell")
Set objShell32 = CreateObject("Shell.Application")


strAnswer = MsgBox("Do you want to create short cut ?", vbYesNo)
strStartMenuFolderPath = objShell.SpecialFolders("AllUsersStartMenu")
If strAnswer = vbYes Then
CreateShortcuts
Else
DeleteShortCuts
End If


End Sub


'********************
' Create ShortCuts *
'********************


Sub CreateShortcuts()

strShortCutName = InputBox("Enter the ShortCut Name")
strTargetPath = InputBox("Enter The Target file path")

Set objShellLink = objShell.CreateShortCut(strStartMenuFolderPath & "\" &
strShortCutName & ".lnk")

objShellLink.TargetPath = strTargetPath
objShellLink.WorkingDirectory = strStartMenuFolderPath
objShellLink.Save

strPinToStartMenu = MsgBox("Do you want to pin the Item to Start Menu",
vbYesNo)

If strPinToStartMenu = vbYes Then
PinToStartMenu (strShortCutName)
End If

End Sub



'********************
' Delete ShortCuts *
'********************

Sub DeleteShortCuts()


set objFSO = CreateObject("Scripting.FileSystemObject")

Set objStartMenuFolder = objFSO.GetFolder(strStartMenuFolderPath)

strShortCutToDelete = InputBox("Please Enter the Shortcut's Name to Delete
(without
the extension)")

For Each objFile In objStartMenuFolder.Files

strFileName = objFSO.GetBaseName(objFile.Path)
If StrComp(strFileName, strShortCutToDelete) = 0 Then
UnPinFromStartMenu (strFileName)
objFSO.DeleteFile (objFile.Path)
Exit For
End If
Next

End Sub


'********************
' Pin To Start Menu *
'********************

Public Sub PinToStartMenu(strShortCutName) 'As String

'ssfCOMMONSTARTMENU is a ShellSpecialFolder Constant
'All the constants can be obtained from
'http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/pl
atform/s
hell/reference/objects/shell/shellspecialfolderconstants.asp


Set objFolder = objShell32.NameSpace(ssfCOMMONSTARTMENU)

Set colFolderItems = objFolder.Items

For Each objFolderItem In colFolderItems

If StrComp(objFolderItem.Name, strShortCutName) = 0 Then ' The verbs
are
what you get when a right click on the object is done.
objFolderItem.InvokeVerb ("P&in to Start menu")
Exit For
End If

Next

End Sub


'************************
' UnPin From Start Menu *
'************************


Public Sub UnPinFromStartMenu(strShortCutName) 'As String

Set objFolder = objShell32.NameSpace(ssfCOMMONSTARTMENU)

Set colFolderItems = objFolder.Items

For Each objFolderItem In colFolderItems

If StrComp(objFolderItem.Name, strShortCutName) = 0 Then
objFolderItem.InvokeVerb ("Unp&in from Start menu")
Exit For
End If

Next

End Sub

Buz Brodin
MCSE NT4 / Win2K
Microsoft Enterprise Domain Support

Get Secure! - www.microsoft.com/security

This posting is provided "as is" with no warranties and confers no rights.

Please do not send e-mail directly to this alias. This alias is for
newsgroup purposes only.




<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
<>
 
Back
Top