Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


INI or Registry
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Fri Nov 30, 2007 12:53 am    Post subject: Re: INI or Registry Reply with quote

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
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Fri Nov 30, 2007 1:01 am    Post subject: Reply with quote

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
View user's profile Send private message
goldengold
Grandmaster Cheater Supreme
Reputation: -1

Joined: 11 Nov 2006
Posts: 1841
Location: -.-

PostPosted: Fri Nov 30, 2007 7:18 am    Post subject: Reply with quote

Lol only appal is pr0 enough to answer!
_________________
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Fri Nov 30, 2007 9:28 am    Post subject: Reply with quote

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
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Fri Nov 30, 2007 9:39 am    Post subject: Reply with quote

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 Rolling Eyes

_________________
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Fri Nov 30, 2007 9:54 am    Post subject: Reply with quote

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 Rolling Eyes


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
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Fri Nov 30, 2007 11:29 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
linden
Master Cheater
Reputation: 0

Joined: 10 Mar 2006
Posts: 319

PostPosted: Fri Nov 30, 2007 12:26 pm    Post subject: Reply with quote

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 Evil or Very Mad

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 Exclamation 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
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Fri Nov 30, 2007 12:28 pm    Post subject: Reply with quote

linden wrote:
(It's a pity that MS batch scripts are too weak for installation purpose)


PowerShell, anyone?

_________________
Back to top
View user's profile Send private message
Thlump
Grandmaster Cheater
Reputation: 0

Joined: 26 Aug 2007
Posts: 964
Location: 206.51.226.121

PostPosted: Fri Nov 30, 2007 2:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Fri Nov 30, 2007 2:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
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!!

PostPosted: Fri Nov 30, 2007 3:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Fri Nov 30, 2007 4:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Fri Nov 30, 2007 4:32 pm    Post subject: Reply with quote

NO WAI. You dont need admin access........
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Fri Nov 30, 2007 4:55 pm    Post subject: Reply with quote

how do people get the fact "you need admin priv to get in the registry" ?

it's not true :S
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites