Should I use a registry or a flat file to save the state of the program?

We have many products that maintain their β€œstate” in the registry.

What is the best practice for maintaining program states? What are the advantages / disadvantages of saving program states like registry entries or saving program states to a flat file, such as XML?

Thank!

+3
source share
8 answers

The obvious answer would be to save these states in a regular file, which makes it easier for users to manually backup / restore the state.

+3
source

Also note that there are several keys in the registry that are special for each user in the system.

, - , , ​​(, , ). , .

+2

, . , - , , Vista UAC.

, .Net, Windows . , , , , , , .

, , , () . . UAC , , .

0

.

( , "" Windows?)

( ) . , ..

, "", " /", . , , , .

0

. .INI . , . , .INI .

(/?). . , .

, . Windows/// ( ). c:\program files, . , , c:\user data, ( tweakui power toy regedit ( - )).

- Windows , re-insatll ( ), C:

Windows, . , , , , , .

Imo, , - Windows, - .

? . INI, , , .

, ...

0

, , INI XML . , , . , , , , .

0

, =)

io vs , /
/ / /

,

0

, . - XCopy-Deployable, . .ini( - INI, .net )

, (, Windows), "" , , . , , C:\Program Files , . , (% APPDATA% , , Silverlight), " ".

, Mono, Registry Flat Files.

0

Source: https://habr.com/ru/post/1738650/


All Articles