1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

DOS file editing syntax

Discussion in 'DOS/Other' started by TripleCrown, Nov 10, 2001.

Thread Status:
Not open for further replies.
Advertisement
  1. TripleCrown

    TripleCrown Thread Starter

    Joined:
    Nov 4, 2001
    Messages:
    35
    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?
     
  2. Rollin' Rog

    Rollin' Rog

    Joined:
    Dec 9, 2000
    Messages:
    45,855
  3. MacFromOK

    MacFromOK

    Joined:
    Mar 18, 2001
    Messages:
    1,741
    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
     
  4. TripleCrown

    TripleCrown Thread Starter

    Joined:
    Nov 4, 2001
    Messages:
    35
    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.
     
  5. MacFromOK

    MacFromOK

    Joined:
    Mar 18, 2001
    Messages:
    1,741
    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
     
  6. TripleCrown

    TripleCrown Thread Starter

    Joined:
    Nov 4, 2001
    Messages:
    35
    Yeah, man..that'll work! I just hope my sister can follow those directions...

    Thanks man.
     
  7. MacFromOK

    MacFromOK

    Joined:
    Mar 18, 2001
    Messages:
    1,741
    Glad to help, let us know what happens... :)
     
  8. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Similar Threads - file editing syntax
  1. niedernsill
    Replies:
    3
    Views:
    416
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/58148

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice