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

Tech-Archive recommends: Fix windows errors by optimizing your registry




"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
must 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!


.



Relevant Pages

  • Re: Batch needs lots of intervention...?
    ... Net, run two programs, and finally boot the system into ... echo XP boot in safe mode>c:\safemode ... I launch the batch file from a shortcut. ... Check this link about your first automatic logon: ...
    (microsoft.public.windowsxp.general)
  • Re: Batch needs lots of intervention...?
    ... Net, run two programs, and finally boot the system into ... echo XP boot in safe mode>c:\safemode ... I launch the batch file from a shortcut. ... Check this link about your first automatic logon: ...
    (microsoft.public.windowsxp.general)
  • Re: XP extremely slow boot up
    ... regular mode and then in safe mode and checked the event log. ... The Event Viewer is accessible in safe mode. ... boot in normal mode. ... On how to disable the Add-ons follow this: ...
    (microsoft.public.windowsxp.general)
  • Re: Nothing on screen?
    ... hour trying to boot in safe mode. ... As a last resort I was going to try to do the repair installation of windows ... Go into the System BIOS - can you get around in the System BIOS? ... Exit System BIOS and boot the System in Safe Mode again. ...
    (microsoft.public.windowsxp.general)
  • Re: BAT file to re-start in Safe Mode...?
    ... I have a simple batch file that dumps 4000 contacts from my ... the BAT file in Safe Mode with Networking, ... To boot into safe mode, you need to maintain two versions of the hidden ... Create a shortcut on your desktop. ...
    (microsoft.public.windowsxp.general)