Re: BAT file to re-start in Safe Mode...?
- From: "Pegasus \(MVP\)" <I.can@xxxxxxxxxx>
- Date: Sun, 28 Sep 2008 20:03:07 +0200
"Kenneth" <usenet@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:lpdvd4de14bolr3n67f4fmr9732qckr0j2@xxxxxxxxxx
On Fri, 26 Sep 2008 09:07:42 -0400, Kenneth
<usenet@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
On Fri, 26 Sep 2008 14:59:42 +0200, "Pegasus \(MVP\)"
<I.can@xxxxxxxxxx> wrote:
Hi again,
I entered the appropriate shutdown switches, and not the
shortcut causes the reboot into safe mode with networking.
Unfortunately, running it a second time leaves it in safe
mode, but before asking anything about that issue, I have
another question:
I had hoped to do all this because I have a BAT file that
invokes a process that often fails when run in normal mode.
If running in safe mode, it always runs properly.
I wanted to create a routine that would boot into safe mode,
run my BAT file, and when it finished, would re-boot back
into normal mode.
In all this, I had neglected the fact that when I enter safe
mode, I have to log in again, and have to enter my password.
Am I correct that there is no way that I could "bypass" that
part of the process? That is, am I correct that even if I
get this working correctly, I will still have to enter that
password manually?
Please let me know, and that will help me to decide if I
should pursue this further.
Many thanks,
--
Kenneth
If you email... Please remove the "SPAMLESS."
It is possible to fully automate the logon process and to force a
specific
process to run after the automatic logon process, either unconditionally
or
conditional upon the current mode (Safe Mode / Normal Mode).
Hi Pegasus,
Thanks for that info...
I will pursue this further, and very much appreciate all
your kind help.
All the best,
Hi again,
I remain perplexed, and despite some help from folks in a
batch file group, can't get the routine to work properly.
If I launch the desktop shortcut, the system reboots into
Safe Mode with Networking as I wanted.
But then, if I reboot, it boots again into Safe Mode with
Networking.
If, instead of rebooting, I first run myboot.bat manually,
then when I do reboot, the system boots into Normal Mode.
So, it appears that either myboot.bat is not running when
the system boots, (even though is displays in Scheduled
Tasks as "run at system startup,") or, it does run at boot,
but finds "Safe" to be true, and so keeps the system in Safe
Mode.
Here is the current myboot.bat:
@echo off
if /i "%1"=="Safe" (
attrib -r -a -s -h c:\boot.ini
copy /y c:\boot.SAFE c:\boot.ini
shutdown -r -t 00
) else (
attrib -r -a -s -h c:\boot.ini
copy /y c:\boot.NORM c:\boot.ini
)
Can you spot the problem?
Many thanks,
--
Kenneth
Since you now have a good understanding how the whole thing holds together,
it should be easy to work out where things get off the rails. We agreed
before that the file c:\boot.ini get replaced by c:\boot.norm or by
c:\boot.safe. We now have this simple fact:
=> At boot time (any boot!) c:\boot.ini should replaced by c:\boot.norm.
You must therefore check if this is the case.
1. Force a safe boot with your newly created shortcut.
2. Wait until the system has rebooted to Safe Mode.
3. Check c:\boot.ini. What does it look like?
If it does not like right, you must check if and when your batch file ran.
This is just as simple - modify it like so and examine c:\test.txt after the
reboot:
@echo off
if /i "%1"=="Safe" (
attrib -r -a -s -h c:\boot.ini
echo Safe boot on %date% at %time% >> c:\test.txt
copy /y c:\boot.SAFE c:\boot.ini
shutdown -r -t 00
) else (
echo Normal boot on %date% at %time% >> c:\test.txt
attrib -r -a -s -h c:\boot.ini
copy /y c:\boot.NORM c:\boot.ini
)
No magic to this one either! By the way, the -a switch in your attrib
command servers no purpose whatsoever. Omit it - it only confuses the issue!
.
- Follow-Ups:
- Re: BAT file to re-start in Safe Mode...?
- From: Kenneth
- Re: BAT file to re-start in Safe Mode...?
- References:
- Re: BAT file to re-start in Safe Mode...?
- From: Kenneth
- Re: BAT file to re-start in Safe Mode...?
- From: Pegasus \(MVP\)
- Re: BAT file to re-start in Safe Mode...?
- From: Kenneth
- Re: BAT file to re-start in Safe Mode...?
- From: Kenneth
- Re: BAT file to re-start in Safe Mode...?
- From: Pegasus \(MVP\)
- Re: BAT file to re-start in Safe Mode...?
- From: Kenneth
- Re: BAT file to re-start in Safe Mode...?
- From: Pegasus \(MVP\)
- Re: BAT file to re-start in Safe Mode...?
- From: Kenneth
- Re: BAT file to re-start in Safe Mode...?
- From: Kenneth
- Re: BAT file to re-start in Safe Mode...?
- From: Pegasus \(MVP\)
- Re: BAT file to re-start in Safe Mode...?
- From: Kenneth
- Re: BAT file to re-start in Safe Mode...?
- From: Kenneth
- Re: BAT file to re-start in Safe Mode...?
- Prev by Date: Re: No Windows
- Next by Date: Opening a file with two different applications.
- Previous by thread: Re: BAT file to re-start in Safe Mode...?
- Next by thread: Re: BAT file to re-start in Safe Mode...?
- Index(es):
Relevant Pages
|
Loading