Autor |
Beitrag |
Apo95
Beiträge: 129
Win2000, WinXP, WinServer 2003 Standard x86, Win7x64
Delphi 6 Enterprise, D2009 Architect, RAD Studio XE6 Architect
|
Verfasst: Di 22.07.14 12:47
Hallo,
ich benötige mal Hilfe beim Zugriff auf die Registry. Ein Lizenzmanager Retgistrierungsdaten in der Registry ablegen; beim Zugriff darauf gibt es die Fehlermeldung: Fehler beim Holen von Daten 22.07.2014
Die Daten werden in 'HKLM\SOFTWARE\EA\MonetalisFV\LM\2014' abgelegt; es existiert der Unterschlüssel 'TL', der das Tagesdatum und den Boolean TRUE enthält.
Woran kann das liegen, dass ich
a) den Schlüssel in der Registry nicht ausfindig machen kann;
b) dieser Fehler erscheint
?
Danke schonmal
_________________ Lette-Verein MIA
|
|
jaenicke
Beiträge: 19284
Erhaltene Danke: 1742
W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
|
Verfasst: Di 22.07.14 13:36
Bei 64-Bit Betriebssystemen werden 32-Bit Programme auf HKLM\Software\Wow6432Node umgeleitet. Willst du das nicht, musst du das abschalten.
Wenn du nicht explizit mit reinem Lesezugriff auf HKLM zugreifst, brauchst du Adminrechte.
|
|
WasWeißDennIch
Beiträge: 653
Erhaltene Danke: 160
|
Verfasst: Di 22.07.14 13:37
Für diesen Beitrag haben gedankt: Apo95
|
|
Apo95
Beiträge: 129
Win2000, WinXP, WinServer 2003 Standard x86, Win7x64
Delphi 6 Enterprise, D2009 Architect, RAD Studio XE6 Architect
|
Verfasst: Mi 23.07.14 12:02
Danke erstmal sehr für die Antworten ^^
ich brächte nur noch die Informationen, wie ich einen Datumswert und ein Boolean aus der Registry lesen kann.
_________________ Lette-Verein MIA
|
|
jaenicke
Beiträge: 19284
Erhaltene Danke: 1742
W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
|
Verfasst: Mi 23.07.14 13:14
Apo95 hat folgendes geschrieben : | ich brächte nur noch die Informationen, wie ich einen Datumswert und ein Boolean aus der Registry lesen kann. |
Einen Datumswert lesen... read date... hmm, dann machen wir das doch auch mit ReadDate...
docwiki.embarcadero....y.TRegistry.ReadDate
|
|
Apo95
Beiträge: 129
Win2000, WinXP, WinServer 2003 Standard x86, Win7x64
Delphi 6 Enterprise, D2009 Architect, RAD Studio XE6 Architect
|
Verfasst: Mi 23.07.14 13:26
Stellt sich nur die Frage: Wie anstellen? wenn ich das eintrage :
Delphi-Quelltext 1: 2: 3:
| StringGrid1.Cells[ 4, i ] := reg.ReadDate( 'ExpDate' ); StringGrid1.Cells[ 5, i ] := reg.ReadBool( 'DL',1 ); |
gibt es bei beiden die Fehlermeldung: 'inkompatible typen' aber wie soll ich dem Programm sagen, wie der Schlüssel heißt?!
_________________ Lette-Verein MIA
|
|
WasWeißDennIch
Beiträge: 653
Erhaltene Danke: 160
|
Verfasst: Mi 23.07.14 14:31
In einem StringGrid stehen Strings, da kann man also keine Datumswerte, Zahlen etc. (direkt) eintragen, sondern diese müssen zuerst in Strings gewandelt werden (DateToStr, IntToStr, FloatToStr etc.).
|
|
Apo95
Beiträge: 129
Win2000, WinXP, WinServer 2003 Standard x86, Win7x64
Delphi 6 Enterprise, D2009 Architect, RAD Studio XE6 Architect
|
Verfasst: Do 24.07.14 01:42
Das hilft mir nicht weiter, leider,
Die Frage ist, was schreib ich jetzt? Der Registry-Schlüssel für das Ablaufdatum ist ExpDate; für den Boolean ist das DL (Default License).
_________________ Lette-Verein MIA
|
|
zuma
Beiträge: 660
Erhaltene Danke: 21
Win XP, Win7, Win 8
D7 Enterprise, Delphi XE, Interbase (5 - XE)
|
Verfasst: Do 24.07.14 08:35
Deine Fehlermeldung bezieht sich NICHT auf das Auslesen aus der Registry,
sondern auf das Eintragen ins StringGrid.
Es ist einfach nur ein Typecast gemeint:
Delphi-Quelltext 1: 2:
| StringGrid1.Cells[ 4, i ] := DateToStr(reg.ReadDate('ExpDate')); StringGrid1.Cells[ 5, i ] := BoolToStr(reg.ReadBool( 'DL',1 )); |
zuma
_________________ Ich habe nichts gegen Fremde. Aber diese Fremden sind nicht von hier! (Methusalix)
Warum sich Sorgen ums Leben machen? Keiner überlebts!
|
|
WasWeißDennIch
Beiträge: 653
Erhaltene Danke: 160
|
Verfasst: Do 24.07.14 09:01
Genau
|
|
Apo95
Beiträge: 129
Win2000, WinXP, WinServer 2003 Standard x86, Win7x64
Delphi 6 Enterprise, D2009 Architect, RAD Studio XE6 Architect
|
Verfasst: Do 24.07.14 11:20
Danke
Ich komm da nie drauf
_________________ Lette-Verein MIA
|
|