CommonAppData en vbscript
-
08-07-2019 - |
Question
Application du client " NomApp " a ses fichiers de configuration stockés dans CommonAppData.
- Sous Windows XP, il s'agit de
C: \ Documents and Settings \ Tous les utilisateurs \ Application Data \ NomApp
- Sous Windows Vista, il s'agit de
C: \ ProgramData \ NomApp
Comment obtenir le nom de dossier correct avec VBScript?
La solution
Const CommonAppData = &H23& ' the second & denotes a long integer '
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(CommonAppData)
Set objFolderItem = objFolder.Self
MsgBox objFolderItem.Name & ": " & objFolderItem.Path
Le MSDN contient une page répertoriant les autres Shell Special. Constantes de dossier .
Cette page est également intéressante: Enumération des dossiers spéciaux , élément du Guide de script Microsoft Windows 2000.
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow