Solved

How do I automate creating an ERD in Windows 2000?

Posted on 2002-04-18
6
209 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
Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

 

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 Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
unable to search  data in SQL 2000 server 10 320
Group Policy 9 562
Windows timing on domain Pcs 4 463
Visual C++ 'Pure Virtual Function Call' when opening SQL Enterprise Manager 3 404
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…
When using a search centre, I'm going to show you how to configure Sharepoint's search to only return results from the current site collection. Very useful when using Office 365 with multiple site collections.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Suggested Courses

734 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