registry files in binary

leeroyMarv

New Member
I know this may seem to be tampering a bit too much with the registry, but anyway. Could someone tell me how i put a .reg file into the registry? Whenever i try it says: 'cannot import the file as it is not in binary', or somesuch. How would i go about converting the file into binary or the correct registry format (The file being put into the registry is a .bat and the registry file is a .reg). I'm not actually trying to alter the registry, i'm just trying to put my program into the registry. So if anyone could tell me how i could resolve this problem it would be appreciated.
 
A .reg file is a simple text file. If you open it with Notepad it will have a header and some registry entries eg:

REGEDIT4

[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\GoZilla]

You add to the registry by double-clicking the .reg file. If the file is very different to the above format (obviously going to be different content) you may not have a reg file. You can't stick a .bat file in the registry. The registry is not like a folder in Explorer. You need to go to Windows school to learn how to design software for Windows!

What are you trying to do with the .bat file? From your earlier posts about ms dos I'm almost afraid to ask!

Starman*
 
Everyone always indirectly replies to my questions. No one seems to say this is the answer: 'you have to .......' Instead everyone always says: Why do you want to do this? What purpose is it for? Are you trying to destroy your computer?? I don't want to do anything wrong or harmful, trust me, truth is i don't have a reason for wanting it except that i simply want to know for usefulness sake, such as if i get any more of these viruses that put themselves into the reg (starting them everytime windows does.) It's becoming frustrating, though i have resolved many of these problems with many thanks to the people in these forums. Once again thanks to all of you anyway.
 
Last edited:
I answered directly and included an example to make sure you really had a .reg file.
"You add to the registry by double-clicking the .reg file"

I also addressed your question about adding a .bat file to the registry
"You can't stick a .bat file in the registry. The registry is not like a folder in Explorer"

What you are trying to do is completely impossible. How can anyone help further without information on what you are trying to do? The reason you get questions is that you seem to be trying to do things with the wrong tools.

If you want to find out about the registry, try Googling "registry edit tutorial". Here's one tutorial Registry Guide for Windows. You will find most tutorials are quite short and intended for the casual user.

If you are looking at registry editing, you could also see what software is available for doing that.

I use Macro Express (payware) which is "Programming for Dummies". It can do all sorts of very powerful things but in a very simple way. It can read and write to the registry and manipulate the data with its other functions. It can run batch files (ME interfaces transparently with the OS, registry and anything else). All the operations are done within ME. You program some basic function like open Notepad, attach a shortcut key and ME does it. No need for a batch file, the instructions are within ME and it just does what you program. If I wanted to manipulate the registry, I would get ME to read the keys I was interested in, manipulate them then write them back. I'm sure there are other similar applications that do this sort of thing without getting into serious programming languages.

Starman*
 
such as if i get any more of these viruses that put themselves into the reg (starting them everytime windows does.)
That isn't actually a program in the registry. Run msconfig and go to the startup tab. Or regedit and browse to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CurrentVersion\Run. Those entries run programs on startup.
 
Sorry to bring this back up again, thanks for all the help so far. this is the what i was using:
"systemStart"="c:\abc.bat" >> c:ab.reg
I asumed that would put my program into my registry, but when i clicked on ab.reg it said "cannot import ab.reg, the specified file is not a registry script" (But it's a .reg isn't it?) Is this because it is trying to input a batch file into the registry, if it was an exe would it work? Any help would once again be appreciated.
 
It's already been said that you cannot put a batch file in the registry. They are completely incompatible.

I posted some tutorial links on the registry. A quick browse through any will show that the content of the registry is nothing like ms dos/command line batch files. Browse your registry with Regedit and it's quite clear. The registry is made up of keys and you have to know how to configure the keys for the settings of your software and how to read and write when running the software.

Forget the registry for now. What are you trying to arrange for your batch file to do? Run on startup, run a bunch of applications, backup some data etc etc. What did you think adding to the registry would do for you?

Starman*
 
The batch file is working in the registry now. The problem was that i didn't include: "Windows Registry Editor Version 5.00" at the top of the .reg file which i had to import, but it works now. Thanks to everyone for the help.
 
So the file is in the registry and when itryed to do it again in silent mode or whatever it didn't work. A tutorial thing on the internet said it was faster to do it in silent mode and so i thought that would be better as it wont prompt me when i put stuff into the registry (It's not like i would accidentaly put something into my registry so i dont see the point in the prompt.) For some reason the /s switch to make it silent doesn't work did i type it wrong or something?
 
leeroyMarv said:
No problem, thanks again for all the help
I dont believe you, i think that you want to know how to do this silently for malicious reasons. There is no reason why clicking yes is a big issue for you... unless your victim would need to do the same.

The answer is freely available on the web, please dont encourage our members to help you do something they are not comfortable with (and by 'they' I mean 'we', and by 'we' i mean 'I', and by 'I' i mean the 'mods and admins alike')
 
Last edited:
No, this is definitely for malicious reasons, and to tell the truth i dont need it that much, i was simply curious when i saw it on the Microsoft site so i tried it and it didn't work, If you and everyone else does not want to tell me I understand.
 
Back
Top