Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

altering batch script


  • This topic is locked This topic is locked
4 replies to this topic

#1 duffsparky

duffsparky

  • Members
  • 267 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:01:22 AM

Posted 05 March 2012 - 09:33 AM

I want to be able to run chkdsk on all my drives at start-up before much has loaded. It would appear I need to write or find a batch script file to carry out this task. I found the following script on a google search:-

@echo y|chkdsk c: /f
@echo y|chkdsk <next drive letter>: /f
@echo y|chkdsk <next drive letter>: /f
@echo y|chkdsk <next drive letter>: /f
@echo y|chkdsk <next drive letter>: /f
etc
etc

The | character is shift+backslash.


This batch script is placed in the root of the boot drive (c: in my case) and executed via a shortcut from the desk top. The problem for me is that the script runs immediately, skips the c: drive but does offer the option of y/n to scan it at next boot, the script then goes on to check the other drives. There is no time delay after the skipping of the c: drive to select either y/n option and it does not check the drives at boot-up.

Please could someone tell me how to alter the script or tell/show me an alternative method. The other thing is that I would like to be able to view a log of the scan/check.

Cheers.

Edited by duffsparky, 05 March 2012 - 09:37 AM.


BC AdBot (Login to Remove)

 


#2 Eyesee

Eyesee

    Bleepin Teck Shop


  • BC Advisor
  • 3,545 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:In the middle of Kansas
  • Local time:08:22 PM

Posted 05 March 2012 - 01:08 PM

How many drives and what size are they?
Do you suspect that one of the drives might be failing?

I think that this will slow down the boot process dramatically & there really is no need to run chkdsk on startup unless you suspect a hard drive problem.
In the beginning there was the command line.

#3 duffsparky

duffsparky
  • Topic Starter

  • Members
  • 267 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:01:22 AM

Posted 05 March 2012 - 02:06 PM

I'm having a lot of malware(?) problems at the moment which Boopme from BleepingComputer's is helping with.

There are 2 physical drives, one of 40 Gb and the other is 120Gb with 5 partitions in total. I'm not sure if the drive(s) are faulty, I just want to illiminate them as a potential source of the problem beset by the PC. I have also got several other drives of differing sizes, some smaller and some bigger with some connected to other PC's and some not.

Having never really dabbled with scripts before I thought I'd look into them a bit more.

Cheers

#4 Eyesee

Eyesee

    Bleepin Teck Shop


  • BC Advisor
  • 3,545 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:In the middle of Kansas
  • Local time:08:22 PM

Posted 05 March 2012 - 04:00 PM

Since Boopme is helping you with a malware issue I would not make any changes to the system until your thread with him is resolved.

When it is, instead of using chkdsk, I would download and run the hard drive diagnostics tool for the manufacturer of the drives. It is a much more comprehensive test and can take hours to run sometimes. The Seagate SeaTools for Windows diag program is generic enough to work with almost any drive.

But again, I would not make any changes to the system until he is finished or at least advise him of it first & see what he says.
In the beginning there was the command line.

#5 hamluis

hamluis

    Moderator


  • Moderator
  • 56,388 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Killeen, TX
  • Local time:07:22 PM

Posted 05 March 2012 - 04:42 PM

To prevent confusion, this topic is closed.

If you want to reopen it (as opposed to starting a new topic)...after your Am I Infected topic is resolved/closed...just send a PM to me.

Louis




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users