Jump to content

Read registry key - write custom.ini


Recommended Posts

Hello, I need to create an application that simply reads the value of a specific registry key, and then writes that value to a custom.ini file in the following format:

[sTART_CIM_OBJECT]

OEMDuplicatorString = laptopimage2010

[END_CIM_OBJECT]

The 'OEMDuplicatorString' is the name of the key I would be reading, and the value is to the right of the = sign.

If someone could start me in the right direction, I would take it from there, I just don't know how to start the code.

Thank you

Link to comment
Share on other sites

you could use iniwrite but that structure is set up like

[section]

1=some value

2=some value

3=

[next section]

1=

2=

etc

etc

if you were to use this option you would use

$reg=RegRead ( "keyname", "valuename" )

IniWrite ( "filename", "section", "key", $reg )

if the ini doesn't exist, it will be created.

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

I will give this a try, thank you!

you could use iniwrite but that structure is set up like

[section]

1=some value

2=some value

3=

[next section]

1=

2=

etc

etc

if you were to use this option you would use

$reg=RegRead ( "keyname", "valuename" )

IniWrite ( "filename", "section", "key", $reg )

if the ini doesn't exist, it will be created.

Edited by attactician
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...