1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

Program won't execute from "pure DOS" (Recovery Console)

Discussion in 'Legacy Windows' started by broni, 2007/09/05.

  1. 2007/09/05
    broni

    broni Moderator Malware Analyst Thread Starter

    Joined:
    2002/08/01
    Messages:
    21,701
    Likes Received:
    116
    Win 2K here...
    Since Win 2K doesn't have "System Restore ", I'm running ERUNT program, which serves very same purpose (or even better).

    Download, and short description - http://www.majorgeeks.com/download1267.html
    Full manual - http://pcug.org.au/boesen/ERUNT/ERUNT.htm

    To restore my registry, I'm suppose to run "erdnt.exe" command from a given day directory.
    Surely, running it from within Windows takes just a double click on its shortcut. There is no problem to run it manually from Command Prompt (within Windows), but...
    if I reboot to Recovery Console, and I navigate through DOS commands to a directory where "erdnt.exe" is located, when I type it in, and hit Enter, it gives me:
    Bad command or filename
    error.

    Why would that be? Does it have anything to do with "command.com" located in my c:\winnt\system32 directory, instead of root directory?
    Thanks...:)
     
  2. 2007/09/05
    markp62

    markp62 Geek Member Alumni

    Joined:
    2002/05/01
    Messages:
    4,012
    Likes Received:
    16
    No, it means you either used the wrong syntax (bad command) or you typed in a misspelled filename. Which are you doing, changing directories, then typing in the command? Or are you using the full path and filename to start the program.
    If you were following the instructions in the manual, perhaps you were running up against the 8.3 [8 charactor filename. 3 charactor extension] filename limitation, which means the path (C:\WINDOWS\ERDNT\AUTOBACKUP\28-06-2005) couldn't be used in a normal dos environment as AUTOBACKUP and 28-06-2005 both have more than 8 charactors in the name of the folder.
    In this case you would use (C:\WINDOWS\ERDNT\AUTOBA~1\28-06-~1), maybe. If you had a second folder that also started with 28-06-, the proper path could be (C:\WINDOWS\ERDNT\AUTOBA~1\28-06-~2).
     
    Last edited: 2007/09/05

  3. to hide this advert.

  4. 2007/09/05
    broni

    broni Moderator Malware Analyst Thread Starter

    Joined:
    2002/08/01
    Messages:
    21,701
    Likes Received:
    116
    I'm aware of 8.3 rule, but I was able to get into desired directory by using "cd" command.
    You can see a screenshot here:
    http://209.85.48.8/228/109/upload/p3176232.jpg
    No misspelling, either. I had that directory list of files in front of my eyes, and I triplechecked it, besides, I tried to enter same command several times with same results:
    Bad command or filename
     
  5. 2007/09/05
    Arie

    Arie Administrator Administrator Staff

    Joined:
    2001/12/27
    Messages:
    15,174
    Likes Received:
    412
    Source: Description of the Windows 2000 Recovery Console
     
    Arie,
    #4
  6. 2007/09/05
    noahdfear

    noahdfear Inactive

    Joined:
    2003/04/06
    Messages:
    12,178
    Likes Received:
    15
    You should be able to replace the Sam, Security, System and Software hives in the C:\WINNT\system32\config folder with the ones in the C:\WINNT\ERDNT\AutoBackup\9-4-2007 folder. It will however, leave the user hives on the system as they are, which shouldn't be a problem. You can do it all from the C:\WINNT prompt. I would first rename the copies in the config folder.

    C:\WINNT>ren system32\config\sam sam.old
    C:\WINNT>ren system32\config\system system.old
    C:\WINNT>copy erdnt\autoba~1\9-4-2007\sam system32\config
    C:\WINNT>copy erdnt\autoba~1\9-4-2007\system system32\config

    Verify actions using dir at the C:\WINNT\system32\config> prompt.
     
  7. 2007/09/05
    broni

    broni Moderator Malware Analyst Thread Starter

    Joined:
    2002/08/01
    Messages:
    21,701
    Likes Received:
    116
    Thanks, Arie...
    I have that executable file in:
    C:\WINNT\ERDNT\AutoBackup\some date\erdnt.exe

    Isn't it:
    or it means, that I have to copy "erdnt.exe" to straight:
    c:\winnt
    or just
    c:\
    directories,
    and then it should execute?
     
  8. 2007/09/05
    broni

    broni Moderator Malware Analyst Thread Starter

    Joined:
    2002/08/01
    Messages:
    21,701
    Likes Received:
    116
    noahdfear...
    Would your solution work for just that particular date, because ERUNT creates a new folder with a new backup every day at computer startup?
     
  9. 2007/09/05
    noahdfear

    noahdfear Inactive

    Joined:
    2003/04/06
    Messages:
    12,178
    Likes Received:
    15
    It will work for any dated folder. Just keep in mind the 8 character limit. For the folder 8-20-2007 you would need to enter 8-20-2~1
     
  10. 2007/09/05
    broni

    broni Moderator Malware Analyst Thread Starter

    Joined:
    2002/08/01
    Messages:
    21,701
    Likes Received:
    116
    noahdfear...
    Let me rephrase my question.
    Do I have to do this manually, every day, for every new backup?
     
  11. 2007/09/05
    noahdfear

    noahdfear Inactive

    Joined:
    2003/04/06
    Messages:
    12,178
    Likes Received:
    15
    If all you want to do is restore a previous day's registry, pick the day (datenamedfolder) and copy those 4 hive files (Sam, Security, Software and System) to the config folder. Done!
     
  12. 2007/09/05
    broni

    broni Moderator Malware Analyst Thread Starter

    Joined:
    2002/08/01
    Messages:
    21,701
    Likes Received:
    116
    noahdfear...
    Thank you for your advice.
    I'll still wait for Arie's word on my comment to his reply, and then I'll try your solution.
    I assume, I should be able to write some batch file, which will run that chore for me automatically, every day.
     
  13. 2007/09/05
    noahdfear

    noahdfear Inactive

    Joined:
    2003/04/06
    Messages:
    12,178
    Likes Received:
    15
    Why would you want to do that every day? Have I misunderstood your intent? From your first post, I had thought you were trying to restore a previous day's registry from the recovery console. If your intention is to roll back the registry every day, so that any changes made would be reversed, I think you would be better served by an imaging program. Rolling back the registry only could leave changes in the file system orphaned, among other things.

    To answer the question directed at Arie, no, you do not have to copy erdnt.exe to another location. It is already located in a subfolder of the %systemroot% so it falls within the guidelines. I don't know why the erdnt.exe command was not accepted ..... you did it correctly. :confused:
     
  14. 2007/09/05
    broni

    broni Moderator Malware Analyst Thread Starter

    Joined:
    2002/08/01
    Messages:
    21,701
    Likes Received:
    116
    LOOOOL....
    No, I don't want to roll back my registry every day. I just want to have every day fresh copy of it in some place from where I can run "erdnt.exe" through Recovery Console, in case something happens, and I can't boot in normally.

    So, I'm back to square one:confused: :confused: :confused:
     
  15. 2007/09/05
    noahdfear

    noahdfear Inactive

    Joined:
    2003/04/06
    Messages:
    12,178
    Likes Received:
    15
    First, I want to point out that I missed the default hive in my previous post(s). That makes 5 possible to restore.

    Next, an excerpt from ERUNT's author's detailed info page. Take note of what I've bolded.

     
  16. 2007/09/05
    broni

    broni Moderator Malware Analyst Thread Starter

    Joined:
    2002/08/01
    Messages:
    21,701
    Likes Received:
    116
    noahdfear...
    I think, you just nailed it.
    For last few hours, I was exchanging emails with the author of a tutorial to which I posted a link in my first post.
    He just emailed me few minutes ago with very same solution:
    run batch erdnt.con, not erdnt.exe
    He is suppose to test it on his computer, and post with his results, right in this thread.
    I hope, it'll work.
     
  17. 2007/09/05
    broni

    broni Moderator Malware Analyst Thread Starter

    Joined:
    2002/08/01
    Messages:
    21,701
    Likes Received:
    116
    One more thing...
    I actually installed Recovery Console on my machine (I would recommend, everyone does it), so at startup, I'm getting an option to boot to Recovery Console, so I assume, I don't have to involve Windows CD here.
     
  18. 2007/09/05
    noahdfear

    noahdfear Inactive

    Joined:
    2003/04/06
    Messages:
    12,178
    Likes Received:
    15
    You are correct ........ with RC installed, there's no need for the cd.

    Here's a batch for ya, if you wanted to somewhat automate replacing all of the hives from RC.

    Notice I bolded the dated folders? You would need to edit that to point to the folder you wanted to restore from. In RC, navigate to the location of the batch (could be right in C:\WINNT) and type edit nameofbatch.bat
    The screen will fill with the batch file in the DOS editor, allowing you to cursor through and edit the dated foldername. When inside the DOS based editor, to access the menu (for saving changes, exiting the editor, etc), press Alt+F to expand File, or just press Alt to toggle control to the menu and use the arrow keys to navigate the menu.
     
  19. 2007/09/05
    mboesen

    mboesen Inactive

    Joined:
    2007/09/05
    Messages:
    3
    Likes Received:
    0
    ERUNT problem

    Sorry folkes - I goofed when I wrote my article. It's a classic example of RT#$&@M!

    I have corrected the ERUNT article, which with others is available through here: http://www.pcug.org.au/boesen/index.htm

    The BATCH solution works fine (just as Lars Hederer intended). Apologies for my error, and thanks to Broni who brought it to my attention.
     
  20. 2007/09/05
    broni

    broni Moderator Malware Analyst Thread Starter

    Joined:
    2002/08/01
    Messages:
    21,701
    Likes Received:
    116
    This is great, noahdfear!!!
    I appreciate your help.:D

    ...and, Mike - I'm glad our few hours of email exchange brought some nice results:cool:
     
  21. 2007/09/05
    noahdfear

    noahdfear Inactive

    Joined:
    2003/04/06
    Messages:
    12,178
    Likes Received:
    15
    Welcome to WindowsBBS Mike! :)

    Thanks for dropping in here with an update! Fine article too. :)


    broni,

    I said the batch could be in C:\WINNT ..... I will restate that to 'it should be placed in C:\WINNT'

    Batch can then be run by typing nameofbatch.bat at the C:\WINNT> prompt.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.