flat assembler
Message board for the users of flat assembler.

Index > Windows > is it possible to write to an *.exe file

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
donkey7



Joined: 31 Jan 2005
Posts: 127
Location: Poland, Malopolska
donkey7
Quote:

but it still adds up in the Registry after you "apply it".

i don't understand.

registry is just an binary form of ini file. in win 3.11 you had one big ini file that was used by all programs. in win 95 this ini file was replaced with it's binary form - registry.

btw:
for small number of variables, ini files are more practical (easier to edit and so on)
Post 30 May 2006, 18:46
View user's profile Send private message Visit poster's website Reply with quote
Borsuc



Joined: 29 Dec 2005
Posts: 2466
Location: Bucharest, Romania
Borsuc
Cleaning entries may not improve speed, but it certainly removes the 'garbage'

Personally, the registry is out of my control. The filesystem is not. I usually put everything ordered correctly and decent there. The registry is complete out of control, except for a bit of stuff. .ini are so easier to manipulate (even with an .ini editor, if they were binary).

And I meant that .inis are usually put in a folder, split, not in a large .ini. Each program could have it's own .ini, not stored up in system.ini
Post 30 May 2006, 18:48
View user's profile Send private message Reply with quote
donkey7



Joined: 31 Jan 2005
Posts: 127
Location: Poland, Malopolska
donkey7
Quote:

They don't speed up your system

you forgot to mention registry rebuilders. in win 95 it's a program that just exports registry into an reg file, then deletes it's fragmented binary form, and finally builds fresh registry from exported file.
Post 30 May 2006, 18:49
View user's profile Send private message Visit poster's website Reply with quote
donkey7



Joined: 31 Jan 2005
Posts: 127
Location: Poland, Malopolska
donkey7
Quote:

And I meant that .inis are usually put in a folder, split, not in a large .ini. Each program could have it's own .ini, not stored up in system.ini

and i meant you can put a small custom registry in a folder, not in a large system registry. each program could have it's own registry, not stored up in system.dat

Very Happy

[addition]
Quote:

.ini are so easier to manipulate

consider some huge configuration file. for example system registry - convert system.dat to ini file and then try to edit. Smile

for small files text form is better, for huge files binary form is better.


Last edited by donkey7 on 30 May 2006, 18:57; edited 1 time in total
Post 30 May 2006, 18:53
View user's profile Send private message Visit poster's website Reply with quote
Borsuc



Joined: 29 Dec 2005
Posts: 2466
Location: Bucharest, Romania
Borsuc
Really? Cool Cool

But if you can really do this, it simply annoys me all the programs out there that simply store information in system.dat and this is usually "hidden" information for me (in fact, it shouldn't be and isn't at all, but it's so hard to trace it in that massive registry garbage). If registry are "binary .ini" then it's cool, but I never saw separate registry for each programs (only the main "system.dat" registry, but oh well, you learn things everyday).

I don't understand why such programs store everything there, just to keep it out of control. Why don't they store it in the application's directory?
Post 30 May 2006, 18:57
View user's profile Send private message Reply with quote
donkey7



Joined: 31 Jan 2005
Posts: 127
Location: Poland, Malopolska
donkey7
Quote:

Why don't they store it in the application's directory?

you should ask the programmers. basically it's easier to use system registry if you need only one variable to remember. and you can keep informations in registry after uninstall and use them after reinstall.

when ms created registry, they used it for everything. other programmers just followed them.

personally i think that system registry should be used only by system (ie. only system can modify system registry), and each program should have it's own configuration file. it will make life a lot easier (eg. you can copy setting betwen computers easily, you don't have any garbage in system registry, etc).

it's a programers choice.

another problem is that ms didn't provide an api to build and manipulate custom registries Sad only custom ini files.
Post 30 May 2006, 19:07
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
Quote:

personally i think that system registry should be used only by system (ie. only system can modify system registry), and each program should have it's own configuration file. it will make life a lot easier (eg. you can copy setting betwen computers easily, you don't have any garbage in system registry, etc).

It's not too bad im/exporting keys programatically, but sure - file-based config is easier for USB thumbdrive applications and such. Registry is a lot nicer for centralized management of a lot of corporate users, though.

Quote:

another problem is that ms didn't provide an api to build and manipulate custom registries Sad only custom ini files.

On NT, you can load/unload and save hives, though...
Post 30 May 2006, 19:12
View user's profile Send private message Visit poster's website Reply with quote
Borsuc



Joined: 29 Dec 2005
Posts: 2466
Location: Bucharest, Romania
Borsuc
donkey7 wrote:
personally i think that system registry should be used only by system (ie. only system can modify system registry), and each program should have it's own configuration file. it will make life a lot easier (eg. you can copy setting betwen computers easily, you don't have any garbage in system registry, etc).
That's exactly what I suggested. Very Happy

If registry is really like .ini (but in binary form), then it's cool.
So I should rephrase my statement "Registry sucks" to "System Registry used by ALL applications (and not only the system) sucks". Wink

donkey7 wrote:
another problem is that ms didn't provide an api to build and manipulate custom registries Sad only custom ini files.
We all know the API skips all the good stuff anyway Wink
Post 30 May 2006, 19:13
View user's profile Send private message Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
you can look at this source that writes to its own exe file by injecting into another process (like explorer.exe):
http://comrade.ownz.com/sources/selfsave.zip

i am not sure if it still works though, i wrote it a long time ago on win2000
Post 31 May 2006, 05:22
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
okasvi



Joined: 18 Aug 2005
Posts: 382
Location: Finland
okasvi
It works well here with xp sp2, but I'd suggest writing addresses for api's, etc. to separate place and then pass ptr to it with createremotethread and refer to injected data as structure. Makes the process more straightforward I think, fill the struct in heap, use writeprocess to copy struct from heap to virtualallocated space in foreign process, copy the actual code and pass ptr to struct, use like 'call [ebx+REMOTEDATA.CreateFile]' to open file etc.
Post 31 May 2006, 18:59
View user's profile Send private message MSN Messenger Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< Last Thread | Next Thread >
Forum Rules:
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


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.