Jump to content

how to edit boot ini ?


Recommended Posts

hi

i want to edit the boot.ini via batch

how to make this work?

the orginal one:

[boot loader]

timeout=4

default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS

[operating systems]

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect

C:\CMDCONS\BOOTSECT.DAT="Microsoft Windows XP Herstelconsole" /cmdcons

new one:

[boot loader]

timeout=4

default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS

[operating systems]

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="XP Professional" /noexecute=optin /fastdetect

C:\CMDCONS\BOOTSECT.DAT="Herstelconsole" /cmdcons

Link to comment
Share on other sites


1. Make sure you have "Hide Protected Operating system files" unchecked (in Tools->Folder Options)

2. In the properties pane for Boot.ini remove the "Read Only" Attribute.

3. Make a Backup :) before messing with Boot.ini

4. Make it Read only after you are done editing.

Link to comment
Share on other sites

1. Make sure you have "Hide Protected Operating system files" unchecked (in Tools->Folder Options)

2.  In the properties pane for Boot.ini  remove the "Read Only" Attribute.

3. Make a Backup :) before messing with Boot.ini

4. Make it Read only after you are done editing.

i know how to set the ATTRIB for the file in cmd

but not how to edit it

Link to comment
Share on other sites

@echo off

ATTRIB  -R -S -H %systemdrive%\boot.ini

del /F /Q %systemdrive%\boot.ini

SET inifile="%systemdrive%\boot.ini"

ECHO [boot loader] >> %inifile%
ECHO timeout=4 >> %inifile%
ECHO default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS >> %inifile%
ECHO [operating systems] >> %inifile%
ECHO multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="XP Professional" /noexecute=optin /fastdetect >> %inifile%
ECHO C:\CMDCONS\BOOTSECT.DAT="HerstelConsole" /cmdcons >> %inifile%

ATTRIB  +R +S +H %systemdrive%\boot.ini

PAUSE

:)

Link to comment
Share on other sites

  • 2 weeks later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.


×
×
  • Create New...