Delphi-PRAXiS
Seite 2 von 3     12 3      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Standardverzeichnisse: Ich brauche mal Eure Mitarbeit (https://www.delphipraxis.net/98947-standardverzeichnisse-ich-brauche-mal-eure-mitarbeit.html)

BenjaminH 4. Sep 2007 15:24

Re: Standardverzeichnisse: Ich brauche mal Eure Mitarbeit
 
Code:
Programmordner: C:\Programme
Dokumentenordner: C:\Dokumente und Einstellungen\All Users\Dokumente
Anwendungsdaten: C:\Dokumente und Einstellungen\All Users\Anwendungsdaten
Windowsversion: (version )
Servicepack: SP2
Windowslanguage: Deutsch (Deutschland)
Statt Version sollte da wohl Win XP Home 32bit stehen.

Luckie 4. Sep 2007 15:27

Re: Standardverzeichnisse: Ich brauche mal Eure Mitarbeit
 
Man beachte, dass bei mir der Dokumentenordner identisch mit den Anwendungsdatenordner ist!

Elvis 4. Sep 2007 15:28

Re: Standardverzeichnisse: Ich brauche mal Eure Mitarbeit
 
Code:
Programmordner: C:\Program Files
Dokumentenordner: C:\Documents and Settings\All Users\Documents
Anwendungsdaten: C:\Documents and Settings\All Users\Application Data
Windowsversion: Microsoft Windows XP (version 5.1)
Servicepack: SP2
Windowslanguage: English (United States)
Ist ein Multilingual XP, bei einem deutschen User könnten die User-spezifischen Ordner innerhalb seines Profils also durchaus deutsch, französisch oder was-weiß-ich-erisch sein.
"könnte" weil ich hier noch nie einen dtsch. User drauf hatte, weiß es also nicht.

emsländer 4. Sep 2007 15:48

Re: Standardverzeichnisse: Ich brauche mal Eure Mitarbeit
 
Zitat:

Zitat von Luckie
Man beachte, dass bei mir der Dokumentenordner identisch mit den Anwendungsdatenordner ist!

Schon witzig. Habe noch ne Änderung gemacht. Mach den Test bitte noch einmal.

Gruss

EL

SirThornberry 4. Sep 2007 15:53

Re: Standardverzeichnisse: Ich brauche mal Eure Mitarbeit
 
Zitat:

Programmordner: C:\Programme
Dokumentenordner: C:\Dokumente und Einstellungen\All Users\Dokumente
Anwendungsdaten: C:\Dokumente und Einstellungen\All Users\Anwendungsdaten
Windowsversion: Microsoft Windows XP (version 5.1)
Servicepack: SP2
Windowslanguage: Deutsch (Deutschland)
Warum hast du eigentlich die Rar-Datei in die Zipdatei gestopft? (die History muss meinetwegen auch nicht mit rein)

Die Muhkuh 4. Sep 2007 15:54

Re: Standardverzeichnisse: Ich brauche mal Eure Mitarbeit
 
Zitat:

Programmordner: C:\Program Files
Dokumentenordner: C:\Users\Public\Documents
Anwendungsdaten: C:\ProgramData
Windowsversion: (version )
Servicepack:
Windowslanguage: Deutsch (Deutschland)
Windows Vista Ultimate 32-Bit

Luckie 4. Sep 2007 15:55

Re: Standardverzeichnisse: Ich brauche mal Eure Mitarbeit
 
Zitat:

Zitat von Luckie
Man beachte, dass bei mir der Dokumentenordner identisch mit den Anwendungsdatenordner ist!

Jetzt bekomm eich was anderes raus:
Code:
Programmordner: C:\Programme
Dokumentenordner: C:\Dokumente und Einstellungen\All Users\Dokumente
Anwendungsdaten: C:\Dokumente und Einstellungen\All Users\Anwendungsdaten
Windowsversion: Microsoft Windows XP (version 5.1)
Servicepack: SP2
Windowslanguage: Deutsch (Deutschland)

emsländer 4. Sep 2007 15:58

Re: Standardverzeichnisse: Ich brauche mal Eure Mitarbeit
 
Zitat:

Zitat von SirThornberry
Zitat:

Programmordner: C:\Programme
Dokumentenordner: C:\Dokumente und Einstellungen\All Users\Dokumente
Anwendungsdaten: C:\Dokumente und Einstellungen\All Users\Anwendungsdaten
Windowsversion: Microsoft Windows XP (version 5.1)
Servicepack: SP2
Windowslanguage: Deutsch (Deutschland)
Warum hast du eigentlich die Rar-Datei in die Zipdatei gestopft? (die History muss meinetwegen auch nicht mit rein)

War ein Versehen. Ist geändert.

Gruss

EL

emsländer 4. Sep 2007 16:01

Re: Standardverzeichnisse: Ich brauche mal Eure Mitarbeit
 
Zitat:

Zitat von Luckie
Zitat:

Zitat von Luckie
Man beachte, dass bei mir der Dokumentenordner identisch mit den Anwendungsdatenordner ist!

Jetzt bekomm eich was anderes raus:
Code:
Programmordner: C:\Programme
Dokumentenordner: C:\Dokumente und Einstellungen\All Users\Dokumente
Anwendungsdaten: C:\Dokumente und Einstellungen\All Users\Anwendungsdaten
Windowsversion: Microsoft Windows XP (version 5.1)
Servicepack: SP2
Windowslanguage: Deutsch (Deutschland)

Jetzt fisch ich mir den Dokumentenordner aus der Registry:
Delphi-Quellcode:
function get_dok_from_reg : string;
Var reg : TRegistry;
begin
  result := '';
  reg := TRegistry.Create;
  try
    reg.RootKey := HKEY_LOCAL_MACHINE;
    if reg.OpenKey('\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders',true) then begin
      if reg.ValueExists('Common Documents') then result := reg.Readstring('Common Documents');
    end;
  except
    //
  end;
end;
Gruss

EL

Luckie 4. Sep 2007 16:04

Re: Standardverzeichnisse: Ich brauche mal Eure Mitarbeit
 
Zitat:

Zitat von emsländer
Jetzt fisch ich mir den Dokumentenordner aus der Registry:

Solltest du nicht tun: The long and sad story of the Shell Folders key

Zitat:

Once upon a time, in what seems like a galaxy far far away (a Windows 95 beta release known as "M3"), we documented a registry key called "Shell Folders" that programs could read to obtain the locations of various special folders like the Fonts folder or the My Documents folder.

The developers who received Windows 95 M3 Beta followed the documentation and used that key.

In the meantime, Windows 95 work continued, and we realized that a registry key was the wrong place to store this information. In part, because a lot of things (like the Control Panel) aren't disk directories so they wouldn't be expressible there. And in another part, because we had forgotten to take into account a feature of Windows NT called roaming user profiles, where your user profile can move around from place to place, so a hard-coded path in the registry is no good.

So we created the function SHGetSpecialFolderLocation, and updated the documentation to instruct developers to use this new function to obtain the locations of various special folders. The documentation on the old "Shell Folders" key was removed.


Alle Zeitangaben in WEZ +1. Es ist jetzt 00:34 Uhr.
Seite 2 von 3     12 3      

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz