Jump to content
Sign in to follow this  

.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

Share this post

Link to post
Share on other sites

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

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
Live for the present,
Dream of the future,
Learn from the past.

Share this post

Link to post
Share on other sites

You will also have to remove the readonly attribute from the ini file.

Who else would I be?

Share this post

Link to post
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
Sign in to follow this