zorro1 Posted January 10, 2006 Posted January 10, 2006 Helloi want to modify boot.ini in unattended modei want replace /noexecute=optin by /noexecute=AllwaysOffthanks
InTheWayBoy Posted January 11, 2006 Posted January 11, 2006 You could disable write-protect, edit, save, then re-enable...or you could right-click on my computer, properties, advanced, startup and recovery settings, and then there is an edit button that will open boot.ini in a temporary editable mode.
No6 Posted January 11, 2006 Posted January 11, 2006 Maybe I'm not understanding the question but he's saying that he wants to modify it without user input.If so, I'd recreate it with a batch file.attrib -r -s -h %systemdrive%\boot.inirename %systemdrive%\boot.ini boot.oldecho [boot loader] > %systemdrive%\boot.iniecho timeout=30 >> %systemdrive%\boot.iniecho default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS >> %systemdrive%\boot.iniecho [operating systems] >> %systemdrive%\boot.iniecho multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=AllwaysOff /fastdetect >> %systemdrive%\boot.iniattrib +r +s +h %systemdrive%\boot.ini... With the appropriate substitutions, of course.If I missed the question altogether, disregard.
Yurek3 Posted January 11, 2006 Posted January 11, 2006 (edited) This is mine bot.iniSETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSIONTITLE Modifiy Boot Delay@echo off SET ProgPath=C:SET ORIG=%ProgPath%\Boot.iniSET NEW=%ProgPath%\Boot_New.iniATTRIB -R -S -H %ORIG%IF EXIST "%NEW%" (ATTRIB -R -S -H %NEW%DEL /Q "%NEW%")FOR /F "delims=*" %%L IN (%ORIG%) DO (SET Begin=%%LIF "!Begin:~0,8!" == "timeout=" (ECHO.timeout=4 >>"%NEW%") ELSE (ECHO.%%L >>"%NEW%"))COPY /Y %ORIG% %ORIG%_OLDCOPY /Y %NEW% %ORIG% bootcfg /raw /id 1 "/noexecute=AlwaysOff /NOPAE /fastdetect" Edited January 11, 2006 by Yurek3
zorro1 Posted January 11, 2006 Author Posted January 11, 2006 bootcfg /raw /id 1 "/noexecute=AlwaysOff /NOPAE /fastdetect"work thanks
Sonic Posted January 11, 2006 Posted January 11, 2006 @Yurek3: Why hard batch to set timeout ??With bootcfg you can use bootcfg /timeout 4/!\ bootcfg isn't available in Home Edition ...
tguy Posted January 18, 2006 Posted January 18, 2006 I use a vbScript I wrote to modify the file: Here is a copy of the script.' Modify Boot.ini file attributesSet objFSO=CreateObject("Scripting.FileSystemObject")Set objFile=objFSO.GetFile("C:\boot.ini")If objFile.Attributes AND 2 Then objFile.Attributes=objFile.Attributes AND 0End If'Modify Boot.ini timing parametersSet TF=objFSO.OpenTextFile("C:\boot.ini",1) '1=ForReadinginp=TF.ReadAllout=Replace(inp,"30","10")Set TF=objFSO.CreateTextFile("C:\boot.ini",True)TF.Writeline outTF.Close' Set Boot.ini file attributes back to Hidden & SystemIf Not objFile.Attributes AND 1 Then objFile.Attributes=objFile.Attributes XOR 2 objFile.Attributes=objFile.Attributes XOR 4End If
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