Solved

How do I automate creating an ERD in Windows 2000?

Posted on 2002-04-18
6
210 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 

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

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

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…
We take a look at some of the most common obstacles that IT teams run into as they work relentlessly to keep all the alarms and sirens from going off at once.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

707 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