RE: Remotely scheduling chkdsk /f

2010-05-10 Thread Nigel Parker
Can you do it like this 
 
c:\windows\system32\chkdsk /r |y
Nigel Parker

Systems Engineer
Ultraframe (UK) Ltd
Tel:   01200 452329
Fax:   01200 452201
Web:   www.ultraframe.com
Email: mailto:nigel.par...@ultraframe.co.uk

Please consider the environment before printing this e-mail

Ultraframe design and manufacture innovative and quality conservatory
solutions to suit all styles, all applications, all consumers and every
price point. By demonstrating our company values of innovation,
integrity, total quality, premium service and customer first, we will to
continue to build our position as UK market leader.

For more information visit our website: www.ultraframe.co.uk

The statements and opinions expressed in this email are my own and may
not represent those of Ultraframe (UK) Ltd. This email is subject to
copyright and the information contained in it is confidential and may be
legally privileged. It is intended only for the named recipient(s).
Access to this email by anyone else is unauthorised. If you are not the
intended recipient, any disclosure, copying, distribution or action
taken or omitted to be taken in reliance on it, is prohibited and may be
unlawful.





From: Oliver Marshall [mailto:oliver.marsh...@g2support.com] 
Sent: 10 May 2010 09:32
To: NT System Admin Issues
Subject: Remotely scheduling chkdsk /f



Hi chaps,.

 

Does anyone know of a way that we can remotely force a workstation to
run a full chkdsk on the next reboot? We have a variety of remote tools
which can run scripts and edit this and that, but the issue we have is
that we can't initiate chkdsk c: /f remotely as the script sits there
wanting someone to press Y to tell it to run on the next reboot. 

 

Is there a way we can, perhaps, edit the boot files directly to tell
them run a chkdsk c: /f? 

 

CHKDSK itself must be editing something to have it run at next reboot
and I'm hoping we can edit this directly.

 

Olly

 

 

 

 Network Support 
Online Backups
Server Management

Tel: 0845 307 3443

Email: oliver.marsh...@g2support.com

Web: http://www.g2support.com http://www.g2support.com/ 

Twitter: g2support http://twitter.com/home?stat...@g2support 

Newsletter: http://www.g2support.com/newsletter
http://www.g2support.com/newsletter 

Mail: 2 Roundhill Road, Brighton, Sussex, BN2 3RF

 

G2 Support LLP is registered at Mill House, 103 Holmes Avenue, HOVE

BN3 7LE. Our registered company number is OC316341. 


 

 


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/  ~personal21eb.jpgg2supportsmall_250x58borderbb3.png

Re: Remotely scheduling chkdsk /f

2010-05-10 Thread James Rankin
Have you tried using psexec to send the command, either with a /y on the
end, or by using an *echo *command to send the y?

e.g. *echo y|chkdsk c: /F /R*

On 10 May 2010 09:31, Oliver Marshall oliver.marsh...@g2support.com wrote:

  Hi chaps,.



 Does anyone know of a way that we can remotely force a workstation to run a
 full chkdsk on the next reboot? We have a variety of remote tools which can
 run scripts and edit this and that, but the issue we have is that we can't
 initiate chkdsk c: /f remotely as the script sits there wanting someone to
 press Y to tell it to run on the next reboot.



 Is there a way we can, perhaps, edit the boot files directly to tell them
 run a chkdsk c: /f?



 CHKDSK itself must be editing something to have it run at next reboot and
 I'm hoping we can edit this directly.



 Olly





Network Support
 Online Backups
 Server Management

 Tel: 0845 307 3443

 Email: oliver.marsh...@g2support.com

 Web: http://www.g2support.com

 Twitter: g2support http://twitter.com/home?stat...@g2support

 Newsletter: http://www.g2support.com/newsletter

 Mail: 2 Roundhill Road, Brighton, Sussex, BN2 3RF



 G2 Support LLP is registered at Mill House, 103 Holmes Avenue, HOVE

 BN3 7LE. Our registered company number is OC316341.








-- 
On two occasions...I have been asked, 'Pray, Mr Babbage, if you put into
the machine wrong figures, will the right answers come out?' I am not able
rightly to apprehend the kind of confusion of ideas that could provoke such
a question.

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/  ~g2supportsmall_250x58borderbb3.pngpersonal21eb.jpg

RE: Remotely scheduling chkdsk /f

2010-05-10 Thread Oliver Marshall
Cheers chaps;


echo y|chkdsk c: /f just made the command prompt window sit there with a 
flashing cursor for ages while everything else around it stopped responding.

 c:\windows\system32\chkdsk /r |y doesnt appear to work at all

Any others?



--
G2 Support
Network Support : Online Backups : Server Management

Web: www.g2support.com
Twitter: g2supporthttp://twitter.com/home?stat...@g2support
Newsletter: www.g2support.com/newsletterhttp://www.g2support.com/newsletter

From: James Rankin [mailto:kz2...@googlemail.com]
Sent: 10 May 2010 10:05
To: NT System Admin Issues
Subject: Re: Remotely scheduling chkdsk /f

Have you tried using psexec to send the command, either with a /y on the end, 
or by using an echo command to send the y?

e.g. echo y|chkdsk c: /F /R
On 10 May 2010 09:31, Oliver Marshall 
oliver.marsh...@g2support.commailto:oliver.marsh...@g2support.com wrote:
Hi chaps,.

Does anyone know of a way that we can remotely force a workstation to run a 
full chkdsk on the next reboot? We have a variety of remote tools which can run 
scripts and edit this and that, but the issue we have is that we can't initiate 
chkdsk c: /f remotely as the script sits there wanting someone to press Y to 
tell it to run on the next reboot.

Is there a way we can, perhaps, edit the boot files directly to tell them run a 
chkdsk c: /f?

CHKDSK itself must be editing something to have it run at next reboot and I'm 
hoping we can edit this directly.

Olly



[cid:image002.png@01CAF02D.89277720]


Network Support
Online Backups
Server Management

Tel: 0845 307 3443
Email: oliver.marsh...@g2support.commailto:oliver.marsh...@g2support.com
Web: http://www.g2support.comhttp://www.g2support.com/
Twitter: g2supporthttp://twitter.com/home?stat...@g2support
Newsletter: http://www.g2support.com/newsletter
Mail: 2 Roundhill Road, Brighton, Sussex, BN2 3RF

G2 Support LLP is registered at Mill House, 103 Holmes Avenue, HOVE
BN3 7LE. Our registered company number is OC316341.








--
On two occasions...I have been asked, 'Pray, Mr Babbage, if you put into the 
machine wrong figures, will the right answers come out?' I am not able rightly 
to apprehend the kind of confusion of ideas that could provoke such a question.





~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/  ~inline: image001.jpginline: image002.png

RE: Remotely scheduling chkdsk /f

2010-05-10 Thread Oliver Marshall
Actually James, ignore what I said, I tried it again and it does appear to work.

Thanks



--
G2 Support
Network Support : Online Backups : Server Management

Web: www.g2support.com
Twitter: g2supporthttp://twitter.com/home?stat...@g2support
Newsletter: www.g2support.com/newsletterhttp://www.g2support.com/newsletter

From: James Rankin [mailto:kz2...@googlemail.com]
Sent: 10 May 2010 10:05
To: NT System Admin Issues
Subject: Re: Remotely scheduling chkdsk /f

Have you tried using psexec to send the command, either with a /y on the end, 
or by using an echo command to send the y?

e.g. echo y|chkdsk c: /F /R
On 10 May 2010 09:31, Oliver Marshall 
oliver.marsh...@g2support.commailto:oliver.marsh...@g2support.com wrote:
Hi chaps,.

Does anyone know of a way that we can remotely force a workstation to run a 
full chkdsk on the next reboot? We have a variety of remote tools which can run 
scripts and edit this and that, but the issue we have is that we can't initiate 
chkdsk c: /f remotely as the script sits there wanting someone to press Y to 
tell it to run on the next reboot.

Is there a way we can, perhaps, edit the boot files directly to tell them run a 
chkdsk c: /f?

CHKDSK itself must be editing something to have it run at next reboot and I'm 
hoping we can edit this directly.

Olly



[cid:image002.png@01CAF02D.A3F2E6C0]


Network Support
Online Backups
Server Management

Tel: 0845 307 3443
Email: oliver.marsh...@g2support.commailto:oliver.marsh...@g2support.com
Web: http://www.g2support.comhttp://www.g2support.com/
Twitter: g2supporthttp://twitter.com/home?stat...@g2support
Newsletter: http://www.g2support.com/newsletter
Mail: 2 Roundhill Road, Brighton, Sussex, BN2 3RF

G2 Support LLP is registered at Mill House, 103 Holmes Avenue, HOVE
BN3 7LE. Our registered company number is OC316341.








--
On two occasions...I have been asked, 'Pray, Mr Babbage, if you put into the 
machine wrong figures, will the right answers come out?' I am not able rightly 
to apprehend the kind of confusion of ideas that could provoke such a question.





~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/  ~inline: image001.jpginline: image002.png

Re: Remotely scheduling chkdsk /f

2010-05-10 Thread Angus Scott-Fleming
On 10 May 2010 at 9:31, Oliver Marshall  wrote:

 Hi chaps,. Does anyone know of a way that we can remotely force a
 workstation to run a full chkdsk on the next reboot? We have a variety of
 remote tools which can run scripts and edit this and that, but the issue we
 have is that we can't initiate chkdsk c: /f remotely as the script sits
 there wanting someone to press Y to tell it to run on the next reboot. Is
 there a way we can, perhaps, edit the boot files directly to tell them run a
 chkdsk c: /f? CHKDSK itself must be editing something to have it run at next
 reboot and I'm hoping we can edit this directly. Olly 

After a little Googling for force chkdsk next reboot, I found this MSKB:

  CHKNTFS.EXE: What You Can Use It For
  http://support.microsoft.com/kb/160963

Reading this, I found that running chkdsk C: /f/r and answering YES changes 
the contents of this registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CURRENTCONTROLSET\CONTROL\Session Manager 

I dumped this key then ran chkdsk C: /f/r, answering YES, and here's what I 
got: 

Before:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager]
BootExecute=hex(7):61,00,75,00,74,00,6f,00,63,00,68,00,65,00,63,00,6b,00,20,\
  00,61,00,75,00,74,00,6f,00,63,00,68,00,6b,00,20,00,2a,00,00,00,00,00

which resolves to autocheck autochk *

After:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager]
BootExecute=hex(7):61,00,75,00,74,00,6f,00,63,00,68,00,65,00,63,00,6b,00,20,\
  00,61,00,75,00,74,00,6f,00,63,00,68,00,6b,00,20,00,2f,00,72,00,20,00,5c,00,\
  3f,00,3f,00,5c,00,43,00,3a,00,00,00,61,00,75,00,74,00,6f,00,63,00,68,00,65,\
  00,63,00,6b,00,20,00,61,00,75,00,74,00,6f,00,63,00,68,00,6b,00,20,00,2a,00,\
  00,00,00,00

which resolves to autocheck autochk /r \??\C: autocheck autochk *

I created both ChkdskON.reg and ChkdskOFF.reg from these keys, and they work to 
toggle the BootExecute key.  I imagine you could write some VBS which would 
insert this registry key remotely.  If you do, please share!

Angus

PS I also found a batch file that might help.  The lines starting with reg 
ADD and ending with /f are actually one long line:

= Included Stuff Follows =
@echo off
chkdsk.exe c:
if ERRORLEVEL 2 goto ADD_CHECK
echo.
echo The drive is okay this time.
goto end
:ADD_CHECK

reg ADD HKLM\SYSTEM\CurrentControlSet\Control\Session Manager /v BootExecute 
/t REG_MULTI_SZ /d autocheck autochk /p \??\C:\0autocheck autochk * /f

echo.
echo The drive has problems and chkdsk will run next boot

:end
= Included Stuff Ends =
Seen here: http://www.pcreview.co.uk/forums/thread-3790839.php


--
Angus Scott-Fleming
GeoApps, Tucson, Arizona
1-520-895-3270
Security Blog: http://geoapps.com/



~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/  ~