Automated Win2k ERD from the Scheduler

S

Sanch

I'm trying to figure out how to create a batch file that
will allow me to run a weekly job in the scheduler that
will run an unattended job to create an ERD in Windows
2000/2003. It wasn't a problem in NT with Rdisk, but now
that I have to use ntbackup, I'm having a problem. I
thought I had it when I did a system state backup to disk,
but now a realize that's not everything I need. Below are
the two files I'm working with, any help would obviously
be appreciated!!!

Bobby

File 1:
echo

format a: /v:erd REM This is requiring manual
intervention

ntbackup backup
systemstate /v:yes /f "c:\winnt\repair\systemstate.bck"


net use x: /delete

net use x: \\remoteserver\rdiskback
x:

rdisk.js REM I found this on the web, but I can't get it
to do the floppy/ERD part.

if not exist %computername% md %computername%

cd %computername%

if not exist backup1. md backup1
if not exist backup2. md backup2
if not exist backup3. md backup3
if not exist backup4. md backup4
if not exist backup5. md backup5
if not exist backup6. md backup6
if not exist backup7. md backup7
if not exist backup8. md backup8
if not exist backup9. md backup9
if not exist backup10. md backup10
if not exist backup11. md backup11
if not exist backup12. md backup12

del /q /f backup1\RegBack\*.*
rd backup1\RegBack
rd backup1
rename backup2 backup1
rename backup3 backup2
rename backup4 backup3
rename backup5 backup4
rename backup6 backup5
rename backup7 backup6
rename backup8 backup7
rename backup9 backup8
rename backup10 backup9
rename backup11 backup10
rename backup12 backup11
md backup12

xcopy /s /q /r /h /c c:\winnt\repair\*.* backup12\*.*

c:
net use x: /delete

pause

exit


File 2 (rdisk.js)
var shell = new ActiveXObject("WScript.Shell");
shell.Popup("Please insert blank floppy disk in the drive
A:", 15);

shell.Run("ntbackup.exe");
WScript.Sleep("500");

shell.Sendkeys("%m"); //selects the Emergency repair, % is
Alt

shell.Sendkeys("B"); //presses the checkbox to have the
registry go to the repair directory - Sanchez

shell.Sendkeys("ENTER"); //presses Enter (could have used
{ENTER} instead of ~)

WScript.Sleep("15000"); //pauses for 15 seconds so as to
not Enter the Cancel!!! You may need to change this.

shell.Sendkeys("%{F4}"); //tries to close but fails and
selects the OK button.

shell.Sendkeys("~"); //presses Enter (could have used
{ENTER} instead of ~) after it has completed

shell.Sendkeys("%{F4}"); //closes NTBACKUP

WScript.Quit();
 
M

Mark V

Sanch wrote in
I'm trying to figure out how to create a batch file that
will allow me to run a weekly job in the scheduler that
will run an unattended job to create an ERD in Windows
2000/2003. It wasn't a problem in NT with Rdisk, but now
that I have to use ntbackup, I'm having a problem. I
thought I had it when I did a system state backup to disk,
but now a realize that's not everything I need. Below are
the two files I'm working with, any help would obviously
be appreciated!!!

[ snipped files ]

AFAIK there is no way to run W2K ntbackup from a command-line to do
an "ERD" backup. SystemState _is_ possible IIRC.

1) Check out ERUNT:
http://home.t-online.de/home/lars.hederer/erunt/
This is likely the easiest Free solution.

2) Batch a solution using regback.exe (from the Resource Kit) and
COPY/or XCOPY. That's what I use. I even get my Curent_User with it
and all zipped (Info-Zip) to a storage directory named by Date.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top