Solved

How do I automate creating an ERD in Windows 2000?

Posted on 2002-04-18
6
206 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
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

786 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