Results 1 to 9 of 9
  1. #1
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Scanreg & Scandisk Hangup in DOS

    Hi:
    I'm pretty ignorant when it comes to batch files. On a Win98SE, Pentium 3, I've been using a batch file by Fred Langa that boots to a DOS prompt, cleans up temp files, deletes index.dat, temporary internet files, shelliconcache, cookies, & a few other things.

    He has a new batch file out & my computer just sits & flashes after it deletes files. The two lines that seem to cause the problem are:

    if exist %winbootdir%commandscanreg.exe %winbootdir%commandscanreg.exe /opt

    scandisk /all /autofix /nosummary

    If I put double colons in front of these lines, my computer will then reboot; otherwise it just sits there.

    Can anyone figure out why?

    Thanks in advance.

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Scanreg & Scandisk Hangup in DOS

    Phil, do those referenced files exist? Perhaps the %winbootdir% variable isn't set at the time that the batch is running. The double colons serve as a remark and the commands don't execute as a result.

    What I would do to troubleshoot it is put the following statement right before those two lines to see what is happening:

    ECHO %winbootdir%
    PAUSE

    This should tell you whether or not %WINBOOTDIR% is valid. If it is, then make sure the EXE files exist in the target path.
    -Mark

  3. #3
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Long Beach, California, USA
    Posts
    1,912
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Scanreg & Scandisk Hangup in DOS

    Those files should be there. You can verify that %winbootdir% works by opening a command box, and typing "set", and hitting Enter. All of the "Environmental Variables" should be exposed.

  4. #4
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Scanreg & Scandisk Hangup in DOS

    Hi Mark:
    I did what you said. In both cases, the line came up

    C:Windows

    Scandisk.exe exists in both Windows & WindowsCommand. Scanreg.exe exists only in C:Windows

    However (& I tested them separately), each time I got the message to "press any key to continue...", but when I did, it just hung there flashing.

    I tried rmruckers suggestion of a DOS prompt & typing
    SET<enter>
    & that showed %bootdir%=C:windows also.

    I boot to DOS regularly to recreate the registry with

    smartdrv.exe 8096
    scanreg.exe /fix /opt

    & it works. There is a line in the batch file that says

    if exist %winbootdir%smartdrv.exe %winbootdir%smartdrv.exe 2048 16

    but I don't know why that would cause problems. When I do it manually, smartdrv speeds things up dramatically. I'm still stumped. Any other ideas?

  5. #5
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Scanreg & Scandisk Hangup in DOS

    Thanks for the info. I did what you said & C:Windows came up as the boot directory. See my reply to Mark. I'm still stumped.

  6. #6
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Scanreg & Scandisk Hangup in DOS

    The next thing I would suggest is just losing the IF EXIST statements. Those are there for maximum compatibility on Fred Langa's part - instead of that, just put in the command lines exactly as it reads:
    <pre>C:WINDOWSSCANREG /opt
    C:WINDOWSSCANDISK /all /nosave /autofix</pre>

    See if that will run correctly. Since you know the files exist in the target directory there's no sense in checking for their existence first!
    -Mark

  7. #7
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Scanreg & Scandisk Hangup in DOS

    Hi Mark:
    Well. Now I'm really confused. I cannot get the commands to run from DOS period. It has nothing to do with the batch file.

    I have scandisk.exe in both
    C:Windows
    C:|WindowsCommand

    If I bring up a DOS window with a prompt at C:Windows & type

    scandisk /all /autofix /nosummary
    or if I type
    scandisk.exe with the same parameters, I get a message that "You typed parameters that are invalid for ScanDisk for windows."

    If I do the same thing at a DOS prompt, it just hangs. Do you have any idea what I'm doing wrong?

    I just noticed something. If I go to Windows help & look for parameters for scandisk, it doesn't seem to support either /all or /autofix or /nosummary. It supports /a (for all). I'm still confused though.

  8. #8
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Scanreg & Scandisk Hangup in DOS

    Interesting that it won't work at all. What happens if you boot to pure DOS from the get go, instead of the "reboot to MS-DOS" option? At startup you would press F8 until you saw the boot options screen and select the command prompt only item. Does Scandisk hang in this environment as well? What if you don't use any switches?

    Almost sounds like the EXE on the hard drive has a problem. You should be able to extract it from the Win98 CD using the System File Checker. Let me know what happens at a DOS prompt from boot. If you need help figuring out how to extract the EXE from the CD, post back and shout it out!

    Just so's you know, when you try to run SCANDISK or SCANREG from within Windows, their 32-bit GUI counterparts are automatically launched (SCANDSKW and SCANREGW).
    -Mark

  9. #9
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Scanreg & Scandisk Hangup in DOS

    Hi Mark:
    I shut off the machine & then booted to DOS. I was able to run the following line without problems:

    scandisk /all /autofix /nosummary

    When I ran

    scanreg.exe /opt

    it hesitated & then got me back to a prompt, so I think it worked (but I didn't see anything, so I'm not sure).

    I'm not sure why I'm having a problem when I reboot to a DOS prompt.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •