Trouver le chemin du bureau ou menu demarrer

cs_Cendra Messages postés 56 Date d'inscription mardi 27 août 2002 Statut Membre Dernière intervention 4 février 2008 - 6 déc. 2002 à 15:20
cs_Cendra Messages postés 56 Date d'inscription mardi 27 août 2002 Statut Membre Dernière intervention 4 février 2008 - 7 déc. 2002 à 17:41
voila apres la creation de raccourcis , je cherche a les placer sur le bureau , mais j'ai pas trouver comment localiser le dossier...

7 réponses

gblade Messages postés 85 Date d'inscription samedi 16 novembre 2002 Statut Membre Dernière intervention 19 mai 2003
6 déc. 2002 à 20:56
hehe j'ai encore la réponse semblerait-il lol
alors c super simple pr trouver le chemin du bureau ou du menu demarrer fo utiliser la fonction SHGetSpecialFolder
elle prend 4 paramètres, le premier et le dernier devrait tjrs rester a zero pr ce ke tu vx faire
le second est un pointeur vers une chaine ou va etre stocker le chemin et le 3e nest autre que l'ID CSIDL du dossier, les differents CSIDL necessaires ds ce cas sont CSIDL_DESKTOPDIRECTORY et CSIDL_STARTUP je crois ;) nutilise pas CSIDL_DESKTOP car il existe masi c pas la mm chose lol la fonction va echouer si tu fe ca ;) pk CSIDL_DESKTOP tt sourt designe le repertoire virtuel dc il na pas de chemin

push 0
push CSIDL_DESKTOPDIRECTORY
push var_chaine
push 0
call SHGetSpecialFolder

la lib a linker c SHELL32.LIB (et pas SHLOBJ.LIB ni SHFOLDER.LIB qui nexistent pas)

voila c tt mais une question qua pas grd chose avoir avec ca, g vu ds tes deux sources que tu utilisais les .IF et autres .ELSE, pkoi ? je vx dire que ca na pas grd interet lol
0
cs_Cendra Messages postés 56 Date d'inscription mardi 27 août 2002 Statut Membre Dernière intervention 4 février 2008 1
6 déc. 2002 à 21:48
bin je trouve que les .IF simplifient la source :p
et surtout pas besoin de taper des cmp , lol :)
0
cs_Cendra Messages postés 56 Date d'inscription mardi 27 août 2002 Statut Membre Dernière intervention 4 février 2008 1
6 déc. 2002 à 21:53
en cherchant bien avec le nom de la fonction que tu m'as indiqué, j'ai trouvé plus d'infos :)
encore merci ;)

- la fonction : SHGetSpecialFolderLocation
- les parametres :
[
· hwndOwner
Handle of the owner window that the client should specify if it displays a dialog box or message box.

· nFolder
Value specifying the folder to retrieve the location of. This parameter can be one of the following values:
CSIDL_BITBUCKET
Recycle bin ¾ file system directory containing file objects in the user?s recycle bin. The location of this directory is not in the registry; it is marked with the hidden and system attributes to prevent the user from moving or deleting it.
CSIDL_COMMON_DESKTOP
File system directory that contains files and folders that appear on the desktop for all users.
CSIDL_COMMON_PROGRAMS
File system directory that contains the directories for the common program groups that appear on the Start menu for all users.
CSIDL_COMMON_STARTMENU
File system directory that contains the programs and folders that appear on the Start menu for all users.
CSIDL_COMMON_STARTUP
File system directory that contains the programs that appear in the Startup folder for all users. The system starts these programs whenever any user logs on to Windows NT or starts up Windows 95.
CSIDL_CONTROLS
Control Panel ¾ virtual folder containing icons for the control panel applications.
CSIDL_DESKTOP
Windows desktop ¾ virtual folder at the root of the name space.
CSIDL_DESKTOPDIRECTORY
File system directory used to physically store file objects on the desktop (not to be confused with the desktop folder itself).
CSIDL_DRIVES
My Computer ¾ virtual folder containing everything on the local computer: storage devices, printers, and Control Panel. The folder may also contain mapped network drives.
CSIDL_FONTS
Virtual folder containing fonts.
CSIDL_NETHOOD
File system directory containing objects that appear in the network neighborhood.
CSIDL_NETWORK
Network Neighborhood ¾ virtual folder representing the top level of the network hierarchy.
CSIDL_PERSONAL
File system directory that serves as a common respository for documents.
CSIDL_PRINTERS
Printers folder ¾ virtual folder containing installed printers.
CSIDL_PROGRAMS
File system directory that contains the user?s program groups (which are also file system directories).
CSIDL_RECENT
File system directory that contains the user?s most recently used documents.
CSIDL_SENDTO
File system directory that contains Send To menu items.
CSIDL_STARTMENU
File system directory containing Start menu items.
CSIDL_STARTUP
File system directory that corresponds to the user?s Startup program group.
CSIDL_TEMPLATES
File system directory that serves as a common repository for document templates.

· ppidl
Address that receives a pointer to an item identifier list specifying the folder?s location relative to the root of the name space (the desktop).
]
0
gblade Messages postés 85 Date d'inscription samedi 16 novembre 2002 Statut Membre Dernière intervention 19 mai 2003
6 déc. 2002 à 23:44
rahhh ah c dla ***** ce forum, menvoie pas mes messages un coup sur deux !!

bon je ferme la parenthese, euh c pas la bonne fonction lol c SHGetSpecialFolderPath (c Path et non Location c important ds la mesure ou at fonction recupere un ITEMIDLIST et al mienne une chaine ;)
bon javais ecrit un detail de la fonction mais ce gentil forum me la (encore) effacer dc g aps le gout de tt retapper alors va voir a cette page http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shgetspecialfolderpath.asp
tu y trouveras ton bonheur ;)

mais tu c sinon je pense que les .IF c pas de l'ASM puiske ton code n'est plsu assemble mais compile ;)
pk si tu aimes ce genre de code tu devrais te mettre au C, tu seras heureux(-se) lol !

sinon ton install doit etre quasiment terminee now ;)
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
cs_Cendra Messages postés 56 Date d'inscription mardi 27 août 2002 Statut Membre Dernière intervention 4 février 2008 1
7 déc. 2002 à 15:36
je viens de trouver une alternative a ces fonctions :) HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders

il y a plein de repertoires en plus ;)
0
gblade Messages postés 85 Date d'inscription samedi 16 novembre 2002 Statut Membre Dernière intervention 19 mai 2003
7 déc. 2002 à 16:00
cool ;)
moi jy connais pas grd chose au registre mais je me demande si c la mm cle pr tous les systemes win32 ?
0
cs_Cendra Messages postés 56 Date d'inscription mardi 27 août 2002 Statut Membre Dernière intervention 4 février 2008 1
7 déc. 2002 à 17:41
j'ai testé avec 98 , ME et 2000
il y a quelsques clefs en plus sous 2000 et ME mais c'est le meme emplacement dans la base de registre :)
0
Rejoignez-nous