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



On Thu, 25 Sep 2008 09:31:38 -0400, Kenneth
<usenet@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

On Thu, 25 Sep 2008 08:27:43 +0200, "Pegasus \(MVP\)"
<I.can@xxxxxxxxxx> 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 Pegasus,

I have made the modifications you describe (and this time,
strictly with cut & paste...)

When, at the command line, I enter C:\boot.ini, it displays
properly.

But, when, at the command line, I enter "MyBoot.bat Safe"
(without quotes), I get an access denied error.

I experimented with entering "MyBoot.bat", "MyBoot.bat
Safe:network" and got the same access denied error. I also
tried it these will full path as "C:\Windows\MyBoot.bat
Safe" but again, always have the same result.

Thanks for any further help,

Hi again Pegasus,

This might be of interest...

As I thought about this further, I decided to look at my
present boot.ini.

I could not find it in C:\ and so ran a Search (yes, my
hidden files are visible.)

The only instance found is in C:\Documents and
Settings\Kenneth\Recent.

The system boots fine, but it would appear that the bat
files are pointing to a boot.ini that does not exist.

Thanks again,
--
Kenneth

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



Relevant Pages

  • Re: BAT file to re-start in Safe Mode...?
    ... you MUST test your batch file. ... Command Prompt so that you can see what's going on. ... But, when, at the command line, I enter "MyBoot.bat Safe" ... Safe:network" and got the same access denied error. ...
    (microsoft.public.windowsxp.general)
  • Re: BAT file to re-start in Safe Mode...?
    ... you MUST test your batch file. ... Command Prompt so that you can see what's going on. ... But, when, at the command line, I enter "MyBoot.bat Safe" ... Safe:network" and got the same access denied error. ...
    (microsoft.public.windowsxp.general)
  • Re: log off command
    ... I simply execute the batch file and let them play... ... If it's by the hour you don't need a script. ... You can logoff a sessionname or a session ID in each case you have to ... Is it possible to issue the command from user1's logon to logoff ...
    (microsoft.public.windowsxp.basics)
  • Re: log off command
    ... I simply execute the batch file and let them play... ... If it's by the hour you don't need a script. ... You can logoff a sessionname or a session ID in each case you have to ... Is it possible to issue the command from user1's logon to logoff ...
    (microsoft.public.windowsxp.basics)
  • Re: log off command
    ... SOON 3600 LOGOFF %ID2% ... If it doesn't work please post what the "at" command returns if you run it ... after the batch file and please again describe when it does not work. ... Matija Hrovat ...
    (microsoft.public.windowsxp.basics)

Loading