Skip navigation

JSI Tip 2532. Create a Windows 2000 ERD using WSH.


To create an ERD in Windows 2000, you:

1. Open the Backup GUI by navigate to the Accessories folder, then the System Tools folder and opening the Backup GUI.

2. Press the Emergency Repair Disk button.

3. Check the Also backup the registry.... box and press OK.

4. Press OK and close the backup when it is finished.

You can convert the above to a hot key, or icon press, if you create a shortcut the the following .vbs file:

set WshShell = CreateObject("WScript.Shell")
Wshshell.Popup"Please insert blank floppy disk in the drive A:"
Wshshell.Run "ntbackup.exe"
WScript.Sleep 500
Wshshell.Sendkeys "\{ENTER\}"
WScript.Sleep 500
Wshshell.AppActivate "Backup"
Wshshell.Sendkeys "\{TAB\}"
WScript.Sleep 200
Wshshell.Sendkeys "\{TAB\}"
WScript.Sleep 200
Wshshell.Sendkeys "\{TAB\}"
WScript.Sleep 200
Wshshell.Sendkeys "\{ENTER\}"
WScript.Sleep 500
Wshshell.AppActivate "Emergency Repair Diskette"
Wshshell.Sendkeys "\{ \}"
WScript.Sleep 500
Wshshell.Sendkeys "\{ENTER\}"
WScript.Sleep 20000
Wshshell.AppActivate "Emergency Repair Diskette"
Wshshell.Sendkeys "%\{F4\}"
WScript.Sleep 500
Wshshell.Sendkeys "\{ENTER\}"
WScript.Sleep 500
Wshshell.AppActivate "Backup"
WScript.Sleep 500
Wshshell.Sendkeys "%\{F4\}"
WScript.Quit()
NOTE: If you computer is slow, or a Service Pack changes any of the Wshshell.AppActivate text, running this script may have unpredictable results, including forcing a shutdown.

NOTE: There a lots of sample .vbs files on you disk and Win 32 Scripting Journal is a great source.

NOTE: See tip 3200 » How do I recover Windows 2000?


Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish