Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi Programmatically Create a Reg File (https://www.delphipraxis.net/134858-programmatically-create-reg-file.html)

mohfa 30. Mai 2009 23:19


Programmatically Create a Reg File
 
Hi every one , i have this Reg File Format :

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\test]

[HKEY_LOCAL_MACHINE\SOFTWARE\test\profile]
"P"=hex:7a,62,75,73,6e
"M"=hex:34,4f,35,35,37,37,53,36,34,53,34,38,31,35, 50,50,32,34,33,53,51,\
34,38,4e,4f,38,51,51,35,35,4e,4f

and these Values may not be found in the Registry


What i want is how could i prorammatically generate a Reg File with the same Value , i mean from my program i can save a TStringslist ( for example ) into : test.Reg

I don'y want to read from Registry then Save contents into test.reg but all values are created from my Program .


and thanks again .

jaenicke 30. Mai 2009 23:30

Re: Programmatically Create a Reg File
 
Well, you have the values as String at the moment? Then you could use BinToHex to generate the hexadecimal string. Then you only have to insert the comma as separator every two characters, that's it.

The rest is string concatenation, which is not the problem I believe?


Alle Zeitangaben in WEZ +1. Es ist jetzt 19:54 Uhr.

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