Re: BAT file to re-start in Safe Mode...?



On Thu, 25 Sep 2008 17:57:23 +0200, "Pegasus \(MVP\)"
<I.can@xxxxxxxxxx> wrote:


The file c:\boot.ini is a hidden file. You must unhide it and remove its
read-only attribute before you can run my batch file. And no, don't believe
your search results. The file DOES exist in the root folder of drive C:. If
you cannot get Windows Explorer to show you where it is, use the
administrator's method: Open a Command Prompt (see my previous reply), then
type this command:

attrib -r -h -s c:\boot.ini {Enter}


Hi again Pegasus,

Well, it appears that we are almost there...

I have run the attrib, and now the bat file is working
properly in the sense that it modifies the boot.ini in the
intended ways.

If I run MyBoot.bat, and then manually re-boot the box, it
comes up in safe mode. If I then run MyBoot.bat again, and
re-boot, it comes up in normal mode.

But, when I attempt to run the shortcut to start the whole
process, I see only a very brief flash of a command screen
and nothing further happens, that is, there is no reboot.

Here is everything I have at this point:






On my desktop, I have a shortcut pointing to:

C:\WINDOWS\MyBoot.bat safe:network




MyBoot.bat is:

@echo off
if /i "%1"=="Safe" (
copy /y c:\boot.SAFE c:\boot.ini
shutdown /.. /..
) else (
copy /y c:\boot.NORM c:\boot.ini
)



boot.SAFE is:

[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="Microsoft
Windows XP Professional" /noexecute=optin /fastdetect
/safeboot:network




boot.NORM is:

[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="Microsoft
Windows XP Professional" /noexecute=optin /fastdetect



and I have a scheduled task that runs MyBoot.bat at startup.


I saw that in Myboot.bat the criterion is "Safe" but I am
attempting to run "Safe:Network." I tried switching it, but
still had the same result: brief flash, but no reboot.

Many thanks as before,
--
Kenneth

If you email... Please remove the "SPAMLESS."
.



Relevant Pages

  • Re: loading screen
    ... [Boot Loader] ... [Operating Systems] ... I put the disk in the drive, and it said to shut down windows and boot from the disk. ... Now, everytime I reboot or restart windows, I always get that selection screen. ...
    (microsoft.public.windowsxp.general)
  • Re: Lost ability to sellect OS at boot
    ... MS-MVP Windows - Shell/User ... | [Boot Loader] ... | [Operating Systems] ... | if I'll get the opportunity to select the OS on startup if I reboot. ...
    (microsoft.public.windowsxp.general)
  • Re: Invalid boot.ini. Booting from c:windows
    ... the line under [operating systems] is all on one line) ... Microsoft MVP [Windows] ... | The only issue is every reboot goes through the same time frame. ...
    (microsoft.public.windowsxp.general)
  • Re: RAM Limitation in SBS 2003
    ... then reboot. ... I remember there was a switch that i read ...
    (microsoft.public.windows.server.sbs)
  • Re: EWF/DUA help needed
    ... > Your script does not reboot the device because it likely fails on the EXECUTE command. ... I have changed the script file, ... it may not be good implementation of your script for the purpose of changing running app with EWF on. ... > With EWF command you just commit a registry change to move/replace the JP.exe file on next reboot. ...
    (microsoft.public.windowsxp.embedded)

Loading