chkdsk question (in a script?)

user

Splendid
Dec 26, 2003
3,943
0
22,780
Archived from groups: microsoft.public.windowsxp.basics,microsoft.public.windowsxp.general,microsoft.public.windowsxp.newusers (More info?)

is it possible to run "chkdsk C: /f" in a script without being forced to
manually press "Y" to run chkdsk at next startup? (an autorun type thingy)



--
Woodzy
http://www.rtdos.com/forum
 
Archived from groups: microsoft.public.windowsxp.general (More info?)

(ProteanThread) wrote:
> is it possible to run "chkdsk C: /f" in a script without being forced to
> manually press "Y" to run chkdsk at next startup? (an autorun type thingy)
>
>
>

There are programs that can pass a keystroke through a script, batch or
cmd process but it wouldn't work anyway, you'd still have to restart in
order for chkdsk /f to run on the system drive.

Steve
 
Archived from groups: microsoft.public.windowsxp.basics,microsoft.public.windowsxp.general,microsoft.public.windowsxp.newusers (More info?)

"Steve N." <Steve_N@nunya.biz.nes> wrote in message
news:u3WZQfMJFHA.4028@tk2msftngp13.phx.gbl...
>
> There are programs that can pass a keystroke through a script, batch or
> cmd process but it wouldn't work anyway, you'd still have to restart in
> order for chkdsk /f to run on the system drive.
>


That's what I want, create a shortcut to a script that passes "Y" to "chkdsk
c: /f" automatically
 
Archived from groups: microsoft.public.windowsxp.basics,microsoft.public.windowsxp.general,microsoft.public.windowsxp.newusers (More info?)

(ProteanThread) wrote:
> is it possible to run "chkdsk C: /f" in a script without being forced
> to manually press "Y" to run chkdsk at next startup? (an autorun type
> thingy)

Command line you are looking for:

echo y|chkdsk /f

--
<- Shenan ->
--
The information is provided "as is", it is suggested you research for
yourself before you take any advice - you are the one ultimately
responsible for your actions/problems/solutions. Know what you are
getting into before you jump in with both feet.
 
Archived from groups: microsoft.public.windowsxp.basics,microsoft.public.windowsxp.general,microsoft.public.windowsxp.newusers (More info?)

(ProteanThread) wrote:

> is it possible to run "chkdsk C: /f" in a script without being
> forced to manually press "Y" to run chkdsk at next startup?
Hi

Try this:

echo Y|chkdsk.exe c: /f


--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx