Autor Beitrag
LonghornUser
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 796



BeitragVerfasst: Sa 21.10.06 09:39 
Hallo,
ich möchte, dass mein Programm auch unter Windows XP als Nicht-Admin läuft.
Es schreibt aber Daten in das Windows-Verzeichnis, was dazu führt, dass man Adminrechte braucht. Ich könnte diese Daten aber auch mühelos in ein anderes Verzeichnis schreiben lassen.
Das zweite wäre, dass mein Programm Daten in sein eigenes Verzeichnis schreibt (C:\Programme\App). Geht das als normaler User ?

Im Allgemeinen: Wohin darf man als Normaler User (glaube, das ist ein vorgefertigtes Profil von WinXP) Daten schreiben ?
Und darf ein solcher User etwas in die Registry schreiben ?

Danke schonmal.

Ciao LHUser
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Sa 21.10.06 09:49 
Ins Programmverzeichnis darf der normale User in aller Regel nicht schreiben. Es sei denn, der Admin gibt das Verzeichnis explizit frei, damit die Software fehlerfrei funktioniert. Auch bei einigen "professionellen" Anwendungen ist das leider immer noch nötig. Selbst der Taschenrechner von Windows kann die Option "Wissenschaftliche/Normale Ansicht" nicht speichern, wenn man als User unterwegs ist...:roll:
Normalerweise sollten Daten in das Verzeichnis des Anwenders C:\Dokumente und Einstellungen\{User}\Anwendungsdaten\.

In die Registry darf ein User schreiben, allerdings auch nur in "seinen" Teil, also in den HKEY_CURRENT_USER-Teil.

_________________
We are, we were and will not be.
LonghornUser Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 796



BeitragVerfasst: Sa 21.10.06 16:03 
Aha. Ins "C:\Dokumente und Einstellungen\{User}\Anwendungsdaten\" darf der "User" IMMER schreiben ?
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Sa 21.10.06 16:18 
Wenn die Platte voll ist, dann nicht. Und wenn der Rechner mit extrem eingeschränkten Rechten läuft (Stichwort Kiosk-Modus), dann evtl. auch nicht. Aber sonst schon, denn dafür ist das Verzeichnis da ;-)

_________________
We are, we were and will not be.
LonghornUser Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 796



BeitragVerfasst: Sa 21.10.06 16:47 
Vielen Dank. Das hat ir sehr geholfen :)

Edit: Ah, noch etwas: Wie ermittle ich denn dieses Verzeichnis, da es sich ja immer ändert je nach Sprache und Username ?
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Sa 21.10.06 16:54 
Das fragst du am besten user profile iconLuckie, bzw. guckst mal auf seiner Seite vorbei. Da gibts das auf jeden Fall.

_________________
We are, we were and will not be.
LonghornUser Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 796



BeitragVerfasst: So 22.10.06 12:57 
OK. Habs hinbekommen.

Und hat ein normaler User Lesezugriff auf sagen wir eine Datei namens WINDIR\xyz\xyz.ini ?
Edit: Und hat er Lesezugriff auf Values und Keys in HKEY_LOCAL_MACHINE ?
Timosch
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1314

Debian Squeeze, Win 7 Prof.
D7 Pers
BeitragVerfasst: So 22.10.06 18:21 
Ja, aber keinen Schreibzugriff.

_________________
If liberty means anything at all, it means the right to tell people what they do not want to hear. - George Orwell