Re: BAT file to re-start in Safe Mode...?
- From: Kenneth <usenet@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 24 Sep 2008 18:08:01 -0400
On Wed, 24 Sep 2008 22:50:26 +0200, "Pegasus \(MVP\)"
<I.can@xxxxxxxxxx> wrote:
"Kenneth" <usenet@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:il8ld4p7vp8krr1loks2hltsg0bo6bf4cc@xxxxxxxxxx
On Wed, 24 Sep 2008 07:35:01 +0200, "Pegasus \(MVP\)"
<I.can@xxxxxxxxxx> wrote:
"Kenneth" <usenet@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:644jd4hue0ten96l4gcs4i2ovqg5at1has@xxxxxxxxxx
Howdy,
I have a simple batch file that dumps 4000 contacts from my
database to a TXT file, and then imports them to my
Contacts.
Recently, that last phase has been producing some errors
indicating a problem with the command line text that does
the import. This happens intermittently.
The folks who support the importing software (Contact Genie)
tell me that the command line text is fine (as I would
assume because it usually works properly), and they believe
that something is corrupting the command line text
preventing their software from correctly interpreting it...
I have experimented with the simple work-around of running
the BAT file in Safe Mode with Networking, and this seems to
work.
So, with all that as introduction, here is my question:
Is there a way for me to modify the BAT file so that it
says, in effect, "re-boot into Safe Mode with Networking,
run this routine, then re-boot into full XP?"
Many thanks for any help on this,
--
Kenneth
If a program works in Safe Mode but fails in Normal Mode then you have an
agent running in Safe Mode that intereferes with your program. The usual
method to resolve this problem is based on isolating and removing the
interfering agent.
To boot into safe mode, you need to maintain two versions of the hidden
file
c:\boot.ini, e.g. c:\boot.norm and c:\boot.safe. The file c:\boot.safe
should have this line:
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP
Professional" /fastdetect /noexecute=optin /safeboot:minimal
whereas the file c:\boot.norm lacks the /safeboot:minimal switch.
You also need a batch file c:\windows\MyBoot.bat with these lines inside:
@echo off
if /i "%1"=="Safe" (
copy /y c:\boot.safe c:\boot.ini
shutdown /.. /..
) else (
copy /y c:\boot.norm c:\boot.ini
)
And here is how you put it all together:
1. Create a shortcut on your desktop. Call it "Boot into Safe Mode" and
point it at c:\windows\MyBoot.bat with a parameter of "Safe" (without the
double quotes!).
2. Create a scheduled task. It should invoke c:\windows\MyBoot.bat and it
run at boot time.
That's all. Now each time you double-click "Boot into Safe Mode", the
machine will reboot in Safe Mode. The next time it will boot normally.
Enjoy!
Hi Pegasus,
There is one thing in your suggestion that I don't
understand...
You wrote:
1. Create a shortcut on your desktop. Call it "Boot into
Safe Mode" and point it at c:\windows\MyBoot.bat with a
parameter of "Safe"
double quotes!).
but I don't know how to add the Safe parameter.
Also, I need Safe with Networking, so in any case I need a
bit more information.
Many thanks,
--
Kenneth
After creating the shortcut, right-click it, then click "Properties". Now
add a space to the far end in the "Target" box and type "Safe". It's as
simple as that!
You previously wrote that you found the switch "/safeboot:network" after
some sniffing about. This sounds quite reasonable. I suggest you try it out.
If it does not work, do some more sniffing and report the result here - I
would have to do the same thing too!
Hi again,
I modified the Target as per your description, and the
shortcut points to:
@echo off if /i "%1"=="Safe" (copy /y c:\boot.safe
c:\boot.ini shutdown /.. /..) else
(copy /y c:\boot.norm c:\boot.ini)
I have the other bat files just as you have described.
But, when I fire up the shortcut, all that happens is a
momentary flash of the command line. The system does not
reboot.
That is true whether I set the shortcut target parameter to
safe, or to safe:network.
In the hope that you might spot the problem, I will include
everything I have done.
C:\boot.norm consists of:
[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
(I just pasted in my present boot.ini. Was that what you
intended?)
C:\boot.safe consists of:
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft
Windows XP Professional" /fastdetect /noexecute=optin
/safeboot:network
c:\windows\MyBoot.bat consists of:
@echo off if /i "%1"=="Safe" (copy /y c:\boot.safe
c:\boot.ini shutdown /.. /..) else
(copy /y c:\boot.norm c:\boot.ini)
(Does the above need the [boot loader] line?)
and finally, I have a scheduled task that calls
c:\windows\MyBoot.bat and runs at boot.
Sincere thanks for any further help,
--
Kenneth
If you email... Please remove the "SPAMLESS."
.
- Follow-Ups:
- Re: BAT file to re-start in Safe Mode...?
- From: Pegasus \(MVP\)
- Re: BAT file to re-start in Safe Mode...?
- References:
- 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\)
- BAT file to re-start in Safe Mode...?
- Prev by Date: Re: XP Install Catch-22
- Next by Date: Re: Internet Connection Sharing
- 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