Solved

How do I automate creating an ERD in Windows 2000?

Posted on 2002-04-18
6
203 Views
Last Modified: 2010-04-13
I would like to be able to automate the process of creating an ERD in Windows 2000.  In Windows NT I would run the erd process then copy the files from the repair dir to a folder on the network - this was all done with a simple batch file.  How can this be done in 2000?  Thanks!
0
Comment
Question by:kmno
  • 4
  • 2
6 Comments
 
LVL 44

Expert Comment

by:CrazyOne
ID: 6951824
0
 
LVL 44

Expert Comment

by:CrazyOne
ID: 6951884
The problem is that Win2000 locks the registry files down so they can't be easily copied while the system is running. To copy the registry it has to be done programmically and the general way of doing it is opening the specific hives in the registry and saving that hive using these Windows API calls.

OpenProcessToken
LookupPrivilegeValue
AdjustTokenPrivileges
RegOpenKeyEx
RegSaveKey

NTBackup does have command line usage. You can backup specific files using a batch file. However it compresses the files into a single file much like a ZIP file but you can't access these files accept using the NTBackup Retore feature.

To see the command line swithces go to
Start > Run and type in ntbackup /?

This will give you a list of what swithces are available and some examples on how to use them.  
0
 
LVL 44

Accepted Solution

by:
CrazyOne earned 300 total points
ID: 6951903
The ERD is pretty much a Graphical User Interface thing now. You can write a script that will open the NTBackup GUI and process the ERD but I got to tell you that it is not very reliable and can be a bit of a problem and a bit untidy. The main problem is you will need to have a floppy disk in the drive for it to work. And timing is also a issue.

var shell = new ActiveXObject("WScript.Shell");

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

shell.Sendkeys("{ENTER}");
WScript.Sleep("275");

shell.AppActivate("Backup");
shell.Sendkeys("{TAB}");
WScript.Sleep("275");
shell.Sendkeys("{TAB}");
WScript.Sleep("275");
shell.Sendkeys("{TAB}");
WScript.Sleep("275");

shell.Sendkeys("{ENTER}");
WScript.Sleep("275");

shell.AppActivate("Emergency Repair Diskette");
shell.Sendkeys("{ }");
WScript.Sleep("275");

shell.Sendkeys("{ENTER}");
WScript.Sleep("20000");

shell.AppActivate("Emergency Repair Diskette");
shell.Sendkeys("%{F4}");
WScript.Sleep("275");

shell.Sendkeys("{ENTER}");
WScript.Sleep("275");

shell.AppActivate("Backup");
shell.Sendkeys("%{F4}");

WScript.Quit();
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:kmno
ID: 6960039
Along with the other suggestions I have come to the conclusion that I will manually run the ERD's on my 2000 machines.  Thanks!
0
 
LVL 44

Expert Comment

by:CrazyOne
ID: 6960068
Yeah I was kind of saying that in a round about way. It is unfortunate that MS can't help the users out by building in an automated process for this condidering how important it is to backup the registry. XP has the System Restore feature but I still think it would be appropriate for MS to have an option for automating just the ERD. :>)
0
 

Author Comment

by:kmno
ID: 6960724
That's what I figured.  Thanks for the help - like you stated, hopefully they will come up with a way to automate that process so I don't have to spend a morning on ERDs!  Thanks Again!
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
We have come a long way with backup and data protection — from backing up to floppies, external drives, CDs, Blu-ray, flash drives, SSD drives, and now to the cloud.
This video discusses moving either the default database or any database to a new volume.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

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

9 Experts available now in Live!

Get 1:1 Help Now