DOS key installed

I recently attempted to load a new game called Command and Conquer.  When finished, it rebooted my computer.  Then I got a message:

Dos key 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)?

Whether I answer y or n, it then comes back and says:

Invalid drive specification
Invalid drive specification
Invalid drive specification

Press any key to continue...

When I press a key, Windows 95 starts to come up, and then goes back to the message "Dos key installed" and I start all over again.

What is wrong?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You should run these commands in MS-DOS mode. unlock the drive by typing
    unlock <x>:
Where X is your drive
Win95 provides some kind of protection from directly accessing the disk. This is done because it supposibly knows everything that needs to be writen, and can monitor it.

The fact that MS has provided the lock command (or is it unlock), suggests that this is not always the case :)

When you need to perform actions (run programs) which needs direct access to the disk, then Lock/Unlock command needs to be ran. The message you are getting after Doskey is the warning message from this program. It is not realted to the Doskey command.

You should find out what installed this command, and see if it's necessary, because this command is highly insecure.

I also assume that Windows cannot start when in unlock mode. That is why you are rebooting all over again. Or probably there is a loop in the batch file.
When your machine shows "Starting Windows 95" press F8. Choose Step by Step confirmation.  This will run your bootup on step at a time.  Choose yes for each command until you get to doskey.  Say yes to doskey (as stated by almiller, doskey is not the culprit).  Write down each following command before saying yes to them.  The ones that prove trouble you should post on this ticket so we can take a look...

(or just copy the text of your autoexec.bat to the ticket)
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Follow menitos advice.  If unclear ask for more information.  You need the contents of your autoexec.bat file and post it here.

almiller has probably diagnosed the problem and following mentios advice the offending lines of your autoexec.bat file can be found and removed.
also look for a autoexec.dos and autoexec.w40 and post it here (along with autoexec.bat from dbrunton's note)

Obtaining a copy of your Autoexec.bat
After boot and when you see the line "Starting Windows 95" Press your F8 key. Or be tapping your F8 key after the first window of your boot.

The "Boot Menu" should load and give you several options to choose from. Amoung the ones already mentioned above are "Safe mode" and "Command Prompt only"
You can try the Safe Mode first to get into Windows bypassing system StartUp files. To make this selection of Safe Mode use your Arrow keys to move up and down amoung the Boot Menu selections. Or type the corresponding number shown to the left of the Boot Menu selection you want, which is Safe Mode, and then press your Enter key.

Once in Safe Mode you can now go to your Find, Files and folders and type the following search string->
and then press enter.
** Note- On all files with the .bat extension you will need to Right click on and choose the Edit selection. When the .bat (batch) file opens you may then Right Click inside the file, choose the Select All, and then Right click again on the highlighted portion of the file and select Copy. If asked to save any changes select NO.

Now you will be able to PASTE the contents of the autoexec.bat file to a text file (Notepad.exe) and then onto a floppy. From your floppy you can COPY & PASTE the floppy's text file contents to this discussion by Right clicking inside the comment or answer field and then select PASTE from the choices given.

Each other file that is found with this search can be opened by first single left clicking on the file, Pressing and holding the shift key down and then Right clicking on the file and select Open With from the choices given. ** Note use Notepad.exe to open these files and you may or may not want to remove the check mark from the "Always use this program to open these files".

Okay, lets say you can not get into Safe Mode.
From the Boot Menu, (See Above->F8) choose Command Prompt only.

When the C:\>
Prompt comes up type in the following;
copy autoexec.* C:\auto.txt
Now press your enter key.
Now with a floppy in your a:\
Type in the following;
copy c:\auto.txt a:\
Now press enter.

DOSKey is not likely to be the direct cause of the problem; all it does is let you use the up and down arows to scroll through the previous cmds list. We do need that Autoexec.Bat; however, if you do not respond soon, I (or someone else who reads this) will post an answer like "Wake up and help us or you'll never get an answer" to get your attention.

Give us that AUTOEXEC.BAT please,
Wait a minute, wait a minute, wait a minute... VIRUS SCAN IMMEDIATELY! has good demos of their virus scanners; many destrutive-payload viruses (such as Melissa[doesn't do this, but is a d-load virus]) which are Trojans (you have to run it yourself) try to take you into that mode. Press N at the prompts; I don't see why C&C needs that mode. Invalid Drive Spec? Sounds like a Format Z: in something that's trying to wipe data you don't have. I am suspicious. I do tend to suspect viruses more than I should, but it's worth it to scan with symptoms like that. They're classic.

It sounds like the install has placed some commands in the Autoexec.bat file.  Simply remove these lines from the file.

Boot to Safe Mode Command prompt only, then either edit, or rename the Autoexec.bat file.
Still with us eastert?
Go out and buy the game instead of having one of your "friends" give it to you. It looks like they wrote a trojan and it changed your autoexec.bat ( pretty sloppy work ). Smack -em upside the head and have 'em fix it for you when you drag them over to your house ;-)
eastertAuthor Commented:
I'm sorry it took so long to get back
to this.  I've been studying for finals.
I did follow advice from Jason S.  I had
a backup copy of my autoexec.bat file and restored it in the Safe Mode.  Now when I start my computer, I don't get any error statements but it just keeps going into DOS mode.  I get a statement
"You are currently running in MS-DOS mode.  Do you want to return to normal mode,to run windows applications again?
{enter = y, esc = n}?
If I enter "Y", Windows begins to start up again, and then goes back to DOS mode.

Here are the contents of my restored
autoexec.bat file.

rem - By Windows Setup - LH C:\WINDOWS\COMMAND\MSCDEX /D:IDECD_00 /L:G
rem - By Windows Setup - LH C:\DEV\MOUSE
don't see any problems with that autoexec.bat
1st line is mcafee virus scan
2nd is a check if mcafee found something
3rd turn off echoing
6th was used for cdrom loading that windows doesn't need
7th is loading of the mouse that windows doesn't need
8th is for sound card setup for dos games
9th is for path info
10th is cdrom loading again but this time it's enabled. Don't think it's needed but leave it anyway since it's not the cause of the probrom.

....but do you have any c:\autoexec.w40 and/or c:\autoexec.dos? They might be hidden so try using "attrib | more" (more is so it doesn't scroll if off the screen, if you get a More error just use "attrib") while you see the "C:\>" prompt. It would show all files in this folder. if you see .w40 and/or .dos with an S and/or H next to it, type "attrib -h -s autoexec.w40" (and .dos for that file) then post them here.
Post your CONFIG.SYS file here.  This is in the same folder as AUTOEXEC.BAT.

These problems might be in this file.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Bottom line is that your "friend" gave you a bad copy of Command and Conquer. I am abandoning this question due to the possible illegality of the copy. I suggest that your friend who gave you the copy assist you with your problem. And the next time your system boots, try hitting ESC right after it says "Starting Windows95" to get you out of the "DOS Mode" loop your system seems to be in.
eastertAuthor Commented:
The game I loaded was purchased.
eastertAuthor Commented:
Thanks, dbrunton.  It was the config.sys
file.  I had a backup copy and swapped it with the "problem" file.  Everything works great!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.