Jump to content

.ini problem


Recommended Posts

K, im building a small aplication for changing bootscreens, and im stuck into a problem with the boot.ini file.

heres the problem: I need to add one more line to the [operating systems] section but i cant because if i use iniwrite that chenges the current key/value under the [operating systems] section.Heres an example


[boot loader]



[operating systems]

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Default bla bla bla" /noexecute=optin /fastdetect /kernel=booton.exe

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Test the new bootscr" /noexecute=optin /fastdetect /kernel=booton.exe --------------------this line (starting from "multi(0) bla bla) i want to ADD it under the first line, but i cant beacause if i use iniwrite it changes the first line into the second, NOT add it .

i hope u guys understand, so plss hllp

and sorry for my bad eng

Link to comment
Share on other sites

  • Developers

Kind of "different" solution but this could do it when ran once:

$curval = Iniread("boot.ini","operating systems","multi(0)disk(0)rdisk(0)partition(1)\WINDOWS","")
$curval = $curval & @CRLF & 'multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Test the new bootscr" /noexecute=optin /fastdetect /kernel=booton.exe'
IniWrite("boot.ini","operating systems","multi(0)disk(0)rdisk(0)partition(1)\WINDOWS",$curval)
Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
Live for the present,
Dream of the future,
Learn from the past.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...