View previous topic :: View next topic |
Author |
Message |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Fri Nov 30, 2007 12:53 am Post subject: Re: INI or Registry |
|
|
x0r wrote: |
Registry
Pros
-Needs administrator access, this is a huge blow to compatibility
|
That's not true. You should be writing to HKEY_CURRENT_USER, not HKEY_LOCAL_MACHINE. You can read HKEY_LOCAL_MACHINE even if you are limited. writing to HKEY_LOCAL_MACHINE is like writing to the Windows directory with INI files. I say registry, but if you want to use text files, choose XML.
_________________
|
|
Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Fri Nov 30, 2007 1:01 am Post subject: |
|
|
Registry is better in every sense, only real con is that you can't easily move the keys by copying the folder. It's strongly typed, making it easy to modify, easier than its equivalent text file alternative (if it is stored properly in the %appdata% directory, not in the same directory) and people shouldn't be editing raw program data anyway. Provide a good interface to the program options through your UI.
The best option is to use the registry by default, but provide a command line option to use text files, in case the program is being used from a usb drive.
_________________
|
|
Back to top |
|
 |
goldengold Grandmaster Cheater Supreme
Reputation: -1
Joined: 11 Nov 2006 Posts: 1841 Location: -.-
|
Posted: Fri Nov 30, 2007 7:18 am Post subject: |
|
|
Lol only appal is pr0 enough to answer!
_________________
|
|
Back to top |
|
 |
DeletedUser14087 I post too much
Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Fri Nov 30, 2007 9:28 am Post subject: |
|
|
i choose INI files, easy and faster.
it doesn't leave traces in Registry.
Edit: and appal is right, no need admin access to Registry ;s
|
|
Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Fri Nov 30, 2007 9:39 am Post subject: |
|
|
Kaspersky wrote: | i choose INI files, easy and faster. |
"easy" is subjective, and INI files are many times slower
Kaspersky wrote: | it doesn't leave traces in Registry. |
it just leaves traces in the filesystem
_________________
|
|
Back to top |
|
 |
DeletedUser14087 I post too much
Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Fri Nov 30, 2007 9:54 am Post subject: |
|
|
appalsap wrote: | Kaspersky wrote: | i choose INI files, easy and faster. |
"easy" is subjective, and INI files are many times slower
Kaspersky wrote: | it doesn't leave traces in Registry. |
it just leaves traces in the filesystem  |
i knew you'll be the smartass to say it, some installers remove it and some don't, 100% of the registry installers don't remove registry. (well, the modern arn't).
|
|
Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Fri Nov 30, 2007 11:29 am Post subject: |
|
|
Depending on what you are using this for, I personally prefer XML over INI. But if it's for a quick tossup, INI is faster.
As for injection that requires the reading of a file, you can run into issues with the dll being able to read the config file effectively without using a little hack here or there to obtain the original path. In that case I would either have the DLL read from registry, use a small hack to obtain the original launch path to get the config file, or have the launcher communicate to the dll via MMF.
Many possibilities to choose from I guess :s
I attempt to use the registry as little as possible unless the thing I release is installed so it can easily remove the keys when its uninstalled. If not you usually land up with keys that will never be used anymore causing the reg to get cluttered up with crap.
_________________
- Retired. |
|
Back to top |
|
 |
linden Master Cheater
Reputation: 0
Joined: 10 Mar 2006 Posts: 319
|
Posted: Fri Nov 30, 2007 12:26 pm Post subject: |
|
|
Kaspersky wrote: | i knew you'll be the smartass to say it, some installers remove it and some don't, 100% of the registry installers don't remove registry. (well, the modern arn't). |
From end user's view, I prefer INI too. Slow, but really need speed for reading those initial values?
By experience, most installers either don't care about, or are not configured to remove the registry settings. Some shareware/freeware don't even come with installers, and some software writes their keys deep down inside registry hive, some keep their settings in more than one places. It also seems that VB IDE by default configures new projects to write a key under "HKCU\Software\VB and VBA Program Settings\ProjectName", but many times I find those entries are empty, looks like many VB programmers don't bother deleting those unnecessary codes. Registry may be fast and good to use, but just too many abuses. All in all, I feel it's just annoying
INI files are almost always placed under the same folder as the software, all you need to do is delete the whole application folder.
I don't like installers too. Most are just black boxes. You have no idea where they are copying files to other than the target path, what changes they are making to the system, and hence where they are leaving traces. Can't trust them The best installer would be something like those perl scripts on UNIX, where you can see exactly what the installation process is doing. (It's a pity that MS batch scripts are too weak for installation purpose)
Sorry, went off topic...
|
|
Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Fri Nov 30, 2007 12:28 pm Post subject: |
|
|
linden wrote: | (It's a pity that MS batch scripts are too weak for installation purpose) |
PowerShell, anyone?
_________________
|
|
Back to top |
|
 |
Thlump Grandmaster Cheater
Reputation: 0
Joined: 26 Aug 2007 Posts: 964 Location: 206.51.226.121
|
Posted: Fri Nov 30, 2007 2:25 pm Post subject: |
|
|
I prefer INI, because Microsoft developers made the registry so that one mistake can slow down your computer down to a zombie. And what is powershell?
|
|
Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Fri Nov 30, 2007 2:33 pm Post subject: |
|
|
Thlump wrote: | I prefer INI, because Microsoft developers made the registry so that one mistake can slow down your computer down to a zombie. |
That's just a lie.
_________________
|
|
Back to top |
|
 |
Acim Grandmaster Cheater Supreme
Reputation: 0
Joined: 04 Jun 2007 Posts: 1948 Location: If anyone has a GMS DK and they don't need it I'll have it!!
|
Posted: Fri Nov 30, 2007 3:47 pm Post subject: |
|
|
Registry, even if you needed admin priveliges, couldn't you run as an admin?
_________________
I'm alive and well, but I quit CEF for a while. Legitly playing since Novemberish 07. Starting hacking October 06. |
|
Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Fri Nov 30, 2007 4:05 pm Post subject: |
|
|
Acim wrote: | Registry, even if you needed admin priveliges, couldn't you run as an admin? |
You don't. Read the first reply.
_________________
|
|
Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Fri Nov 30, 2007 4:32 pm Post subject: |
|
|
NO WAI. You dont need admin access........
|
|
Back to top |
|
 |
DeletedUser14087 I post too much
Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Fri Nov 30, 2007 4:55 pm Post subject: |
|
|
how do people get the fact "you need admin priv to get in the registry" ?
it's not true :S
|
|
Back to top |
|
 |
|