Mostrar la ruta de los directorios especiales del sistema Windows (WSH)


Volver
'*********************************************************
' SpecialFolderPath
'
' Función que devuelve la ruta de las siguientes carpetas,
' comunes en todos los sistemas operativos Windows:
'
'   "AllUsersDesktop"
'   "AllUsersStartMenu"
'   "AllUsersPrograms"
'   "AllUsersStartup"
'   "Desktop"
'   "Favorites"
'   "Fonts"
'   "MyDocuments"
'   "NetHood"
'   "PrintHood"
'   "Programs"
'   "Recent"
'   "SendTo"
'   "StartMenu"
'   "Startup"
'   "Templates"
'
' Argumentos:
'    FolderName: cualquiera de los valores anteriores
'
Function SpecialFolderPath(FolderName As Variant) As String
Dim wShell As Object 'New wshShell

    Set wShell = CreateObject("WScript.Shell")
    SpecialFolderPath = wShell.SpecialFolders(FolderName)
    Set wShell = Nothing
        
End Function
'*********************************************************
Contactar Última actualización 25/10/2003     © Juan M. Afán deRibera