Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 162
  • Last Modified:

local and network registry - saving user settings?

Previously we had an ini file which told us to read the main ini on the network or on the users local machine, this way, ruiinung the app from a network, the users could either save individual settings or have the same ones. How can I duplicate this functionality with the registry. I could have a key in the network resgitry. But how can I read the users registry on their machine as opposed to the networks? A user logs onto our app with a unique userid, perhaps I should store under that userid (not a computer useris just for the app)  in the network registry? All thoughts/solutions would be appreciated. Thanks, Tom.
0
boardtc
Asked:
boardtc
  • 2
  • 2
1 Solution
 
bcrotazCommented:
Use the RegistryConnect method of TRegistry to connect to either the local machine or the remote machine.

Step 1 : Connect to local registry (Create an instance of TRegistry, and it does this by default)
Step 2 : Look at the boolean 'network' key
Step 3 : Connect (with RegistryConnect) to the network machine if the network key is true
Step 4 : Do all registry operations as normal, assuming the key structure is the same on the local and network registries.


Tada!

Bryan
0
 
boardtcAuthor Commented:
Thanks for the answer. When I do a RegistryConnect witht eh server name (//server/sys) it reurns false. Any ideas why?
0
 
bcrotazCommented:
Don't know.  Sorry.
0
 
boardtcAuthor Commented:
This system kind of sucks - I wanted to grade your answer but still leave it opne so others could help the problem. Now it's locked - that sucks.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now