Solved

How can I set chkdsk with REG ADD command?

Posted on 2008-10-27
10
338 Views
Last Modified: 2012-06-27
When I try to set a chkdsk from a simple batch file or from a command console with this command: REG ADD HKLM\SYSTEM\CurrentControlSet\Control\Session Manager v/BootExecute /t REG_MULTI_SZ /d autocheck autochk /r \??\C: autocheck autochk * --- I get the error message. Something must be wrong in my assumptions or syntax...any ideas?
0
Comment
Question by:whaulma
  • 6
  • 3
10 Comments
 
LVL 7

Expert Comment

by:maze-uk
ID: 22813807
sorry, what error message?
0
 

Author Comment

by:whaulma
ID: 22814355
Too many command-line parameters
0
 
LVL 22

Expert Comment

by:orangutang
ID: 22814605
Maybe add "autocheck autochk /r \??\C: autocheck autochk *" in quotes?
0
 

Author Comment

by:whaulma
ID: 22814962
no, same error.....
0
 

Author Comment

by:whaulma
ID: 22815322
could it be that i need to enter the binary value.....i can get a .reg file to wor but the command line would be cleaner.....
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 22

Expert Comment

by:orangutang
ID: 22818823
Try this:
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager" /v "BootExecute" /t "REG_MULTI_SZ" /d "autocheck autochk /r \??\C: autocheck autochk *"
I put everything in quote. Also, I think it should be "/v BootExecute" not "v/BootExecute"
0
 

Author Comment

by:whaulma
ID: 22824840
still the error.....very interesting. i can't find this anywhere and i can't be the only one who ever had this issue, but no one appears to have logged this anywhere that i know of.....
0
 
LVL 22

Accepted Solution

by:
orangutang earned 250 total points
ID: 22827817
Hmm, I tested it and it kind of works but it asks if I want to overwrite it. I didn't go any further because I didn't get the error:
https://filedb.experts-exchange.com/incoming/ee-stuff/7346-test.zip
0
 

Author Comment

by:whaulma
ID: 22830938
ok..compared the command line you sent to the one i typed in to be sure that i hadn't fat-fingered something but it matches....i'm running this from system32...that could be the issue...?? i'll test
0
 

Author Comment

by:whaulma
ID: 22840577
well, that straw blew past. are you testing on XP as part of an enterprise domain? about the only thing left is a glitch in a security policy i've stumbled on....you should have gotten the prompt to overwrite, that's correct so, proof of concept....just doesn't work for me.....cheers, i have to move on now as i have a work-around for this situation....
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Disclosure: Use this tutorial only when no other options helps to get Windows XP running without any problems and you don't want to format the drive. The back up of the data is the responsible of the user, however there is a description of how t…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now