duhu Posted September 24, 2005 Share Posted September 24, 2005 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.ini [boot loader] timeout=30 default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS [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 More sharing options...
Developers Jos Posted September 24, 2005 Developers Share Posted September 24, 2005 (edited) 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 September 24, 2005 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 More sharing options...
this-is-me Posted September 24, 2005 Share Posted September 24, 2005 You will also have to remove the readonly attribute from the ini file. Who else would I be? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now