PC Review


Reply
Thread Tools Rate Thread

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

 
 
Kenneth
Guest
Posts: n/a
 
      24th Sep 2008

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 you email... Please remove the "SPAMLESS."
 
Reply With Quote
 
 
 
 
ShadowTek
Guest
Posts: n/a
 
      24th Sep 2008
You could also try posting to alt.msdos.batch.nt
 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      24th Sep 2008

"Kenneth" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> 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!


 
Reply With Quote
 
Kenneth
Guest
Posts: n/a
 
      24th Sep 2008
On Wed, 24 Sep 2008 07:35:01 +0200, "Pegasus \(MVP\)"
<(E-Mail Removed)> wrote:

>
>"Kenneth" <(E-Mail Removed)> wrote in message
>news:(E-Mail Removed)...
>>
>> 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!
>


Hello again,

Many thanks for the great help...!

I realize now that I neglected to say that I need Safe Mode
with Networking.

What modification would I need for that?

All the best,
--
Kenneth

If you email... Please remove the "SPAMLESS."
 
Reply With Quote
 
Kenneth
Guest
Posts: n/a
 
      24th Sep 2008
On Wed, 24 Sep 2008 09:34:29 -0400, Kenneth
<(E-Mail Removed)> wrote:


>>SNIP<<


Hi again,

With some sniffing around, it seems that instead of:

/safeboot:minimal

I would use

/safeboot:network

Would that do the deed?

Thanks again,
--
Kenneth

If you email... Please remove the "SPAMLESS."
 
Reply With Quote
 
Kenneth
Guest
Posts: n/a
 
      24th Sep 2008
On Wed, 24 Sep 2008 07:35:01 +0200, "Pegasus \(MVP\)"
<(E-Mail Removed)> wrote:

>
>"Kenneth" <(E-Mail Removed)> wrote in message
>news:(E-Mail Removed)...
>>
>> 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

If you email... Please remove the "SPAMLESS."
 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      24th Sep 2008

"Kenneth" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Wed, 24 Sep 2008 07:35:01 +0200, "Pegasus \(MVP\)"
> <(E-Mail Removed)> wrote:
>
>>
>>"Kenneth" <(E-Mail Removed)> wrote in message
>>news:(E-Mail Removed)...
>>>
>>> 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!


 
Reply With Quote
 
Kenneth
Guest
Posts: n/a
 
      24th Sep 2008
On Wed, 24 Sep 2008 22:50:26 +0200, "Pegasus \(MVP\)"
<(E-Mail Removed)> wrote:

>
>"Kenneth" <(E-Mail Removed)> wrote in message
>news:(E-Mail Removed)...
>> On Wed, 24 Sep 2008 07:35:01 +0200, "Pegasus \(MVP\)"
>> <(E-Mail Removed)> wrote:
>>
>>>
>>>"Kenneth" <(E-Mail Removed)> wrote in message
>>>news:(E-Mail Removed)...
>>>>
>>>> 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."
 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      25th Sep 2008

"Kenneth" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Wed, 24 Sep 2008 22:50:26 +0200, "Pegasus \(MVP\)"
> <(E-Mail Removed)> wrote:
>
>>
>>"Kenneth" <(E-Mail Removed)> wrote in message
>>news:(E-Mail Removed)...
>>> On Wed, 24 Sep 2008 07:35:01 +0200, "Pegasus \(MVP\)"
>>> <(E-Mail Removed)> wrote:
>>>
>>>>
>>>>"Kenneth" <(E-Mail Removed)> wrote in message
>>>>news:(E-Mail Removed)...
>>>>>
>>>>> 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."


I can see a few problems in your approach. Firstly, your batch file has the
lines broken up differently from the way I put them. Here is what I wrote:
@echo off
if /i "%1"=="Safe" (
copy /y c:\boot.safe c:\boot.ini
shutdown /.. /..
) else (
copy /y c:\boot.norm c:\boot.ini
)
You must not take liberties when copying & pasting this file.

Secondly, the file c:\boot.safe must be an exact copy of the file
c:\boot.norm, with this switch added to the last line: /safeboot:network.

After making these changes, you MUST test your batch file. You do it in a
Command Prompt so that you can see what's going on. Here is how it's done:
1. Click Start/Run/cmd{OK}
2. Type the following commands:
type c:\boot.ini{Enter}
(Examine what you see on the screen)
MyBoot.bat Safe {Enter}
type c:\boot.ini(Enter)
(Examine the screen again. You should see the "/safeboot" switch.)
MyBoot.bat{Enter}
type c:\boot.ini{Enter}
(Examine the screen again. There should be no "/safeboot" switch.)
If there are error messages then you must make a note of them.


 
Reply With Quote
 
Kenneth
Guest
Posts: n/a
 
      25th Sep 2008
On Thu, 25 Sep 2008 08:27:43 +0200, "Pegasus \(MVP\)"
<(E-Mail Removed)> wrote:

>
>I can see a few problems in your approach. Firstly, your batch file has the
>lines broken up differently from the way I put them. Here is what I wrote:
>@echo off
>if /i "%1"=="Safe" (
> copy /y c:\boot.safe c:\boot.ini
> shutdown /.. /..
>) else (
> copy /y c:\boot.norm c:\boot.ini
>)
>You must not take liberties when copying & pasting this file.
>
>Secondly, the file c:\boot.safe must be an exact copy of the file
>c:\boot.norm, with this switch added to the last line: /safeboot:network.
>
>After making these changes, you MUST test your batch file. You do it in a
>Command Prompt so that you can see what's going on. Here is how it's done:
>1. Click Start/Run/cmd{OK}
>2. Type the following commands:
> type c:\boot.ini{Enter}
> (Examine what you see on the screen)
> MyBoot.bat Safe {Enter}
> type c:\boot.ini(Enter)
> (Examine the screen again. You should see the "/safeboot" switch.)
> MyBoot.bat{Enter}
> type c:\boot.ini{Enter}
> (Examine the screen again. There should be no "/safeboot" switch.)
>If there are error messages then you must make a note of them.
>


Hi again Pegasus,

Many thanks for hangin' in there with me on this...

Indeed I had taken "liberties" with the text. I
(incorrectly) thought I was seeing some wrapping oddities. I
will redo it shortly.

All the best,
--
Kenneth

If you email... Please remove the "SPAMLESS."
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Crashes in Normal Mode, Safe Mode With Networking mode butnot Safe Mode bhoi Windows XP Help 0 15th Aug 2011 10:05 PM
Start outlook in regular mode instead of safe mode Bob Brown Microsoft Outlook Discussion 1 24th Dec 2008 12:42 PM
windows wont start in normal mode but does in safe mode =?Utf-8?B?Q2FuYWRpYW5DYXJvbA==?= Windows XP Performance 1 20th Oct 2007 10:27 PM
Nortons File causing safe mode start =?Utf-8?B?am1tNDg=?= Windows XP General 6 27th Jun 2005 07:12 PM
My other computer tries to start in safe mode but just loops back to that start screen. =?Utf-8?B?QnVybmVyNjc4NQ==?= Windows XP Help 0 7th Jan 2004 07:56 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:27 AM.