# DOS file editing syntax



## TripleCrown (Nov 4, 2001)

Does anyone know how to create a batch file to edit system.ini? I have a computer that needs to have this change:

[boot]
system.drv=system.drv
drivers=mmsystem.dll power.drv
user.exe=user.exe
gdi.exe=gdi.exe
sound.drv=mmsound.drv
dibeng.drv=dibeng.dll
comm.drv=comm.drv
shell=Explorer.exe changed to shell=progman.exe
keyboard.drv=keyboard.drv
fonts.fon=vgasys.fon
. . .

It has to be done via a batch file that is called by autoexec.bat when the machine boots. Any ideas?


----------



## Rollin' Rog (Dec 9, 2000)

TC, I'm going to move your question over to the DOS forum, where you may catch an old hand who can do that.

I'm also going to give you a link to the DOS forum at Vdr where Vernon Frazee moderates. If anyone can do that, he can, he is a master of DOS Batch file writing:

http://discussions.virtualdr.com/cg...ion=topics&forum=Windows+3.1+and+DOS&number=7

See also:

http://www.comp-air.com/vfrazee/batch/


----------



## MacFromOK (Mar 19, 2001)

You cannot edit files from a batch file, other than
append lines at the end (utilities can be created
to do most anything from a batch file, but I'm not
currently aware of any that edit ini file entries).

Why can't you just edit the file like you want it?
Or are we talking about an install program?

If you can give us all the details, maybe we can
help you find a solution.

Cheers, Mac


----------



## TripleCrown (Nov 4, 2001)

The problem is outlined in the last thread I posted. I figured the answer to the problem was to change the shell to progman, but then I realized I needed to write a batch file, or some other thing, to edit it. And I discovered that wasn't so easy.

Anyway, here's the post:

http://forums.techguy.org/showthread.php?s=&postid=270369#post270369

USB Keyboard Explorer Blue screen AHHHHH!

ANY help you can offer on this combination of hellish problems would be greatly appreciated.

P.S. I realize my sister can go replace the motherboard, get a keyboard controller card, etc.. but the point is to try to do this as cheaply as possible.

Thanks.


----------



## MacFromOK (Mar 19, 2001)

Here's one idea:

In the boot disk autoexec.bat, write this line:

copy c:\windows\system.ini a:

Run it and you'll have the system.ini on the boot disk.

Edit system.ini (on the floppy) with another computer
to include your shell=progman.exe line.

Change the line in the boot disk autoexec.bat to this:

copy a:\system.ini c:\windows\system.ini

This should put the edited file on the computer.

Note: the COPY command will overwrite a file from
a batch file without prompting, so the keyboard
isn't necessary.

If this doesn't work, let me know and I'll write you
a DOS exe program (that you can use from a batch
file) to edit the ini file if we have to.

Cheers, Mac


----------



## TripleCrown (Nov 4, 2001)

Yeah, man..that'll work! I just hope my sister can follow those directions...

Thanks man.


----------



## MacFromOK (Mar 19, 2001)

Glad to help, let us know what happens...


----------

