High-Tech
Santé-Médecine
Droit-Finances
CodeS-SourceS
Inscription
Plan
Connexion
Rechercher un code, un tuto, une réponse
Accueil
Forum
Tutoriels
Codes Sources
Snippets
Top membres
Tous les langages
Delphi / Pascal
Java
Python
SQL
RegEx
Flash
ASM
IRC
Graphisme
PDA
ColdFusion
Foxpro
Flex
Visual Basic / VB.NET
Forum
Tutoriels
Codes Sources
Snippets
Top membres
PHP
Forum
Tutoriels
Codes Sources
Snippets
Top membres
C/C++/C++.NET
Forum
Tutoriels
Codes Sources
Snippets
Top membres
Javascript
Forum
Tutoriels
Codes Sources
Snippets
Top membres
C#/.NET
Forum
Tutoriels
Codes Sources
Snippets
Top membres
ASP/ASP.NET
Forum
Tutoriels
Codes Sources
Snippets
Top membres
Accueil
Connexion
Déposer un code
Code
Recherche
Haut
Forum
Delphi / Pascal
Sujet Précédent
Sujet Suivant
Connaitre chemin du dossier Démarrer/programmes
fabiin
Messages postés
329
Date d'inscription
mercredi 4 avril 2001
Statut
Membre
Dernière intervention
8 décembre 2009
- 12 déc. 2002 à 19:00
magicvinni
Messages postés
235
Date d'inscription
vendredi 25 avril 2003
Statut
Membre
Dernière intervention
26 juillet 2010
-
12 déc. 2002 à 22:04
Salut, comment connaitre le chemin contenant la liste des fichiers de Démarrer/Programme.
Merci
@+
Fabs 8-)
Afficher la suite
A voir également:
%Favoritesdir%
Chmod 777 dossier
-
Conseils pratiques -PHP
Scanner un dossier
-
Forum PHP
Le dossier contient
✓
-
Forum Visual Basic
Scanner les fichiers dans un dossier
-
Forum Delphi / Pascal
L'accès au chemin d'accès est refusé
✓
-
Forum VB.NET
1 réponse
Réponse 1 / 1
magicvinni
Messages postés
235
Date d'inscription
vendredi 25 avril 2003
Statut
Membre
Dernière intervention
26 juillet 2010
12 déc. 2002 à 22:04
Voici l'unité qui pourra t'aider :
unit wininfo;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Registry;
type
TWindowsInfo = class
private
{ Private declarations }
FDesktopDir: string;
FFavoritesDir: string;
FFontsDir: string;
FNetHoodDir: string;
FPersonalDir: string;
FProgramsDir: string;
FRecentDir: string;
FSendToDir: string;
FStartMenuDir: string;
FStartupDir: string;
FTemplatesDir: string;
protected
{ Protected declarations }
public
{ Public declarations }
// constructor Create(AOwner: TComponent);
constructor Create;
published
{ Published declarations }
property DesktopDir: string read FDesktopDir;
property FavoritesDir: string read FFavoritesDir;
property FontsDir: string read FFontsDir;
property NetHoodDir: string read FNetHoodDir;
property PersonalDir: string read FPersonalDir;
property ProgramsDir: string read FProgramsDir;
property RecentDir: string read FRecentDir;
property SendToDir: string read FSendToDir;
property StartMenuDir: string read FStartMenuDir;
property StartupDir: string read FStartupDir;
property TemplatesDir: string read FTemplatesDir;
end;
//procedure Register;
var
WindowsInfo: TWindowsInfo;
implementation
{
procedure Register;
begin
RegisterComponents('Extra', [TWindowsInfo]);
end;
}
constructor TWindowsInfo.Create;
const
WinKey = '\Software\Microsoft\Windows\CurrentVersion\';
ExplorerKey = '\Software\Microsoft\Windows\CurrentVersion\Explorer\';
var
Reg: TRegistry;
begin
inherited Create;
Reg := TRegistry.Create;
try
Reg.RootKey := HKey_Current_User;
if Reg.OpenKey(ExplorerKey+'Shell Folders', FALSE) then begin
FDesktopDir:=Reg.ReadString('Desktop');
FFavoritesDir:=Reg.ReadString('Favorites');
FFontsDir:=Reg.ReadString('Fonts');
FNetHoodDir:=Reg.ReadString('NetHood');
FPersonalDir:=Reg.ReadString('Personal');
FProgramsDir:=Reg.ReadString('Programs');
FRecentDir:=Reg.ReadString('Recent');
FSendToDir:=Reg.ReadString('SendTo');
FStartMenuDir:=Reg.ReadString('Start Menu');
FStartupDir:=Reg.ReadString('Startup');
FTemplatesDir:=Reg.ReadString('Templates');
end;
finally
Reg.Free;
end;
end;
begin
WindowsInfo:=TWindowsInfo.Create;
end.
Bonne prog
MagicVinni
Votre réponse
Discussions similaires
liste deroulante relier à un dossier...
_deadstar_
-
29 juin 2005 à 17:00
_deadstar_
-
30 juin 2005 à 13:54
Actualisation d'un dossier
cs_PHILOUVB
-
6 juil. 2009 à 20:36
PHILOUVB
-
7 juil. 2009 à 21:01
Code upload fichier d'un internaute vers serveur free
jujudu59110
-
8 févr. 2005 à 03:00
jujudu59110
-
8 févr. 2005 à 11:17
lister un dossier (différence entre fichier et dossier)
mierkool
-
5 févr. 2007 à 23:22
vilhjalms
-
7 févr. 2007 à 05:14
Démarrer/Arrêter une base oracle sous jsp
Carter007
-
19 janv. 2014 à 16:07
Carter007
-
20 janv. 2014 à 02:37
Rejoignez-nous