1.

Solve : LOCK in autoexe.bat?

Answer»

I have an old Compaq laptop and loaned it out to someone who screwed it up.
When I boot it up normally it returns a screen that says the command "lock" might allow
files to be corrupted.When I edit the auto exec.bat file and take out the LOCK line,the screen rolls.
When I boot from a floppy and CHANGE to C:drive, I can see the Windows file but I can't get it to run.
it is Win98SE.
Racer:

Please write the error message down and post a reply with the exact message, word-for-word.  Also, does the computer get to the Windows desktop?  Have you tried booting the computer in Safe Mode to see if the message displays then?

This info from the Windows 98 SE Setup.txt file on your Windows CD might help:

Editing Your Config.sys and Autoexec.bat Files
----------------------------------------------
Your computer's Config.sys and Autoexec.bat files tell your
computer what programs and devices to load at startup (for
example, a virus-scanner program in the Autoexec.bat file
may direct your computer to automatically load that program).
Windows 98 Setup will not run properly with some programs
and devices. To remove or disable such a program or device,
you may need to edit the Config.sys and/or Autoexec.bat files.

To edit the Config.sys and Autoexec.bat files in Windows 98:

1. Click Start, click Run, type Sysedit, and then press ENTER.

2. Click the Autoexec.bat or Config.sys tab and clear the
   check box at the beginning of any line(s) that you want
   to disable.

3. Click Apply, click OK, and then restart your computer.
Thanks for replies. I need to do some homework and will get back to you.No problem. Take it easy!  8-)The exact message is
WARNING
The lock command enables direct disc ACCESS by programs that can corrupt files or damage your computers settings.
Do you want to proceed Y=enter No=Esc

Also the computer WILL boot from a start up disc and it will run in the safe mode and does display the desktop but in 256 color.
I have a copy of the autoexec.bat file but can't figure out how to post it.
Try an alternative. Before you remove the LOCK command from autoexec.bat, from a DOS prompt enter the command UNLOCK c: . Close the DOS window and procede with the edit.Good thinking, 2k!

I'm unfamiliar with the unlock command.  Does Racer have to add nul to the end of the command in this case?

http://support.microsoft.com/kb/160048Ok thanks everybody.Had to take care of a few THINGS before I play with my hobby.
OK, I have the laptop beside my big pc. The message is:

DOSkey installed

WARNING: The LOCK command enables direct disk access by programs that can CORRUPT file names and/or DESTROY disk data,resulting in the loss of files on your disk.
Are you sure (Y/N)

once this message appears the laptop has to be re-started because it will not allow any further commands.


The autoexec.bat files is:
ECHO OFF
SET TMP=c:\windows\temp
SET TEMP=C:\windows\TEMP
SET PROMPT=$p$g
SET winbootdir=C:WINDOWS
SET PATH=C:\WINDOWS;c:\windows;c:\windows\COMMAND
SET BLASTER=A220 I5 D1
LoadHigh C:\WINDOWS\SmartDrv
LoadHigh C:\\Command\DOSKey
LOCK
REM
The following lines have been created by Windows.Do not modify them.
REM
C:
CD C:\
CALL C:\AUTOEXEC.BAT
C:\WINDOWS\WIN.COM /W


thanks
planoracer
Try REM in front of the LOCK command...or...
Rename the autoexec.bat file to autoexec.old / reboot

Alan <&GT;<  Thanks to all that replied. I will try it again.
<--- Agrees with Ale.  8-)



Discussion

No Comment Found