There was a great post by this name which markdmac answered...I had a question about the script provided, which was to add the "My Documents" icon onto the desktop. The question is, should the icon just appear (insert pop'ing sound here) when the script is run or should it show up after a logoff/logon? I ask because the script does not seem to work for me (on a Windows XP PC).
Script below:
[script]
'==========================================================================
'
' NAME: ShowMyDocumentsFolder.vbs
'
' AUTHOR: Mark D. MacLachlan , The Spider's Parlor
' URL: ' DATE : 8/11/2004
'
' COMMENT: <comment>
'
'==========================================================================
On Error Resume Next
Dim path
Set WSHShell = Wscript.CreateObject("WScript.Shell")
'set the key path here. IF you don't end with a '\' then WSH assumes you are pathing to a value.
path = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{450D8FBA-AD25-11D0-98A8-0800361B1103}\ShellFolder\"
'Display the My Documents Folder
WSHShell.RegWrite path & "Attributes","4194676","REG_DWORD"
'Hide the My Documents Folder
'WSHShell.RegWrite path & "Attributes","5343252","REG_DWORD"
[/script]
I hope you find this post helpful. Please let me know if it was.
Regards,
Mark
Script below:
[script]
'==========================================================================
'
' NAME: ShowMyDocumentsFolder.vbs
'
' AUTHOR: Mark D. MacLachlan , The Spider's Parlor
' URL: ' DATE : 8/11/2004
'
' COMMENT: <comment>
'
'==========================================================================
On Error Resume Next
Dim path
Set WSHShell = Wscript.CreateObject("WScript.Shell")
'set the key path here. IF you don't end with a '\' then WSH assumes you are pathing to a value.
path = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{450D8FBA-AD25-11D0-98A8-0800361B1103}\ShellFolder\"
'Display the My Documents Folder
WSHShell.RegWrite path & "Attributes","4194676","REG_DWORD"
'Hide the My Documents Folder
'WSHShell.RegWrite path & "Attributes","5343252","REG_DWORD"
[/script]
I hope you find this post helpful. Please let me know if it was.
Regards,
Mark