General discussion

Locked

Autoexec.bat

By nonameten ·
I would like to have scandisk automatically when i start my PC, i only know it is insert some command into autoexec.bat in windows but what is the command? Somebody can help me to know what is the command please?

Thank You.

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Autoexec.bat

by mark In reply to Autoexec.bat

Hi,

You need to open the MSDOS.SYS file (a hidden file in the root of the C drive), and edit one of the lines within..

AutoScan=Number
Default: 1
Purpose: Defines whether or not ScanDisk is run after a bad shutdown. A setting of 0 does notrun ScanDisk; 1 prompts before running ScanDisk; 2 does not prompt before running ScanDisk but prompts you before fixing errors if any errors are found.

This is only valid for Windows 95 SR2 or Windows 98 O/S's.

Then, save the file, and make sure to re-hide the file. If you're unsure of how to do this, read the following:

Click Start, point to Find, and then click Files Or Folders.

In the Named box, type msdos.sys. In the Look In box, click your C drive.

Right-click the Msdos.sys file, and then click Properties.

Click to clear the Read-Only and Hidden check boxes to remove these attributes from the Msdos.sys file, and then click OK.

Right-click the Msdos.sys file, and then click Open With.

In the Choose the program you want to use box, click WordPad, and then click OK.

Make the changes you want to the Msdos.sys file. When you are done, save the file as a text document, and then quit WordPad.

Right-click the Msdos.sys file, and then click Properties.

Select the Read-Only and Hidden check boxes to set the attributes for the file, and then click OK. Close the Find window.

Restart Windows.
_________
Regards

(Excerpts used from MS Technote Q118579)

Collapse -

Autoexec.bat

by nonameten In reply to Autoexec.bat

The question was auto-closed by TechRepublic

Collapse -

Autoexec.bat

by awdfg In reply to Autoexec.bat

Add the following line to the autoexec.bat file:

c:\windows\command\scandiskw.exe (or scandisk.exe) /a /n

The /a is for scanning all drives and /n is for auto closing scandisk.

If you want to only one drive to be scanned then replace /n with the drive letter.
Replace c:\windws\command with the appropriate path if scandiskw.exe is not in that directory.
You can even place this file in the startup folder also.In Windows see the help for scandisk if required.

Collapse -

Autoexec.bat

by nonameten In reply to Autoexec.bat

The question was auto-closed by TechRepublic

Collapse -

Autoexec.bat

by William Jay In reply to Autoexec.bat

This is a comment and an answer of sorts.

**comment** Answer number 2 is fully correct and it answers the question asked. Answer number 1 has factual errors and provides well meaning but nonetheless bad advice, (wordpad), and does not answer the question given ...

**answer** Use the info in Answer number 2, and for additional help on most command line operations, open a dos prompt, and type <path><command> /? ...

Thanks for the opportunity to save some time and effort and head off malfunction in advance ...

Collapse -

Autoexec.bat

by nonameten In reply to Autoexec.bat

The question was auto-closed by TechRepublic

Collapse -

Autoexec.bat

by nonameten In reply to Autoexec.bat

This question was auto closed due to inactivity

Back to Desktop Forum
7 total posts (Page 1 of 1)  

Related Discussions

Related Forums