By David Wiseman (Administrator)Created 14 Jan 2006
My Rating:
Vote
Rating:
Not Rated
Views:22747
Downloads:288

Display Special Folder Locations

Language:  VBScript

Compatibility

Windows XP Yes Windows 2003 Yes
Windows 2000 Unknown Windows NT Unknown
Vista Unknown Windows 2008 Unknown
Description

This script will display the locations of 'special' folders.

Code

Line Numbers: On  Off      Plain Text
set objShell = createobject("Wscript.Shell")
Set objFso = CreateObject("Scripting.FileSystemObject")

with objShell
	specialFolders = "Desktop: " & .SpecialFolders("Desktop") & vbcrlf & _
			 "MyDocuments: " & .SpecialFolders("MyDocuments") & vbcrlf & _
			 "Startmenu: " & .SpecialFolders("startmenu") & vbcrlf & _
			 "AllUsersDesktop: " & .SpecialFolders("AllUsersDesktop") & vbcrlf & _
			 "AllUsersStartMenu: " & .SpecialFolders("AllUsersStartMenu") & vbcrlf & _
			 "AllUsersPrograms: " & .SpecialFolders("AllUsersPrograms") & vbcrlf & _
			 "AllUsersStartup: " & .SpecialFolders("AllUsersStartup") & vbcrlf & _
			 "Favorites: " & .SpecialFolders("Favorites") & vbcrlf & _
			 "Fonts:" & .SpecialFolders("Fonts") & vbcrlf & _
			 "NetHood: " & .SpecialFolders("NetHood") & vbcrlf & _
			 "PrintHood: " & .SpecialFolders("PrintHood") & vbcrlf & _
			 "Programs: " & .SpecialFolders("Programs") & vbcrlf & _
			 "Recent: " & .SpecialFolders("Recent") & vbcrlf & _
			 "SendTo: " & .SpecialFolders("SendTo") & vbcrlf & _
			 "Startup: " & .SpecialFolders("Startup") & vbcrlf & _
			 "Templates: " & .SpecialFolders("Templates")	
end with

'***** Other Special Folders *****

specialFolders = SpecialFolders & vbcrlf & _
		 "Windows: " &  objFSO.GetSpecialFolder(0) & vbcrlf & _
		 "System32: " & objFSO.GetSpecialFolder(1) & vbcrlf & _
		 "Temp:" & objFSO.GetSpecialFolder(2)


wscript.echo specialFolders

 


Got a useful script? Click here to upload!


 

  Post Comment
Order By:  
User Comments
      
Be the first to post a comment!