Il est ou le dossier windows !!!!!!!!!!!!!!!!!

cs_Booster Messages postés 235 Date d'inscription mercredi 30 octobre 2002 Statut Membre Dernière intervention 6 octobre 2009 - 7 déc. 2002 à 21:26
TheSaib Messages postés 2367 Date d'inscription mardi 17 avril 2001 Statut Membre Dernière intervention 26 décembre 2007 - 8 déc. 2002 à 01:27
Slt je voudrais ne pas ordonner un disque dur a mon programe je voudrais que mon programme cherche automatiquement le disque dur ou ce trouve windows

par exemple : au lieu de lui dire copie le fichier dans c:\windows\fichiercopier.txt ( car si windows n'est pas dans c: ben erreur :sad) )
je lui dise : qq chose\fichierciopier.txt

merci

1 réponse

TheSaib Messages postés 2367 Date d'inscription mardi 17 avril 2001 Statut Membre Dernière intervention 26 décembre 2007 23
8 déc. 2002 à 01:27
Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long

------------------
Function WindowsDir() As String
Dim x As Long
Dim strPath As String
strPath = Space$(1024)
x = GetWindowsDirectory(strPath, Len(strPath))
strPath = Left$(strPath, x)
If Right$(strPath, 1) <> "" Then strPath = strPath & ""
WindowsDir = strPath
End Function

|The S@ib|
0
Rejoignez-nous