Solved

How do I automate creating an ERD in Windows 2000?

Posted on 2002-04-18
6
205 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Recreate New ADC 1 273
Migration  Windows server 2000 to Server 2012 Essentials 4 1,407
VMware:  Latest Tools version for Windows 2000 Guest 3 136
Screen Mirroring 7 55
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…
In 2017, ransomware will become so virulent and widespread that if you aren’t a victim yourself, you will know someone who is.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

867 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

23 Experts available now in Live!

Get 1:1 Help Now