All Forums >> [Scripting] >> Post a VBScript >> Modify Boot INI Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
This is a script I wrote for extra credit in a scripting class I was taking. it's not all that groundbreaking, and I am sure there are probably other ways to accomplish what it does, but I did comment it extensively to explain what is happening and why, so it may be a good script for someone who is learning how to script or for someone who is teaching scripting to use with their students. Functionally, it will modify the boot.ini file to reduce the timeout value by one second each time it's run. Because it was written to modify a "fake" boot.ini file, the path to the file is stored in a variable. In reality, this would, of course, almost always be c:\. It also goes through the process of removing the read only attribute from the boot.ini, creating a backup, and restoring the read-only flag when it's done.