Disk copy in WSH

The following script demonstrates how to access the Windows Diskcopy dialog box. It uses the undocumented DiskCopyRunDll-entry in the Diskcopy.dll.

'************************************************
' File: DiskCopy.vbs (WSH-sample in VBScript)
' Author: (c) G. Born 

' The script opens the Windows Diskcopy dialog.

' In no way shall the author be liable for any
' losses or damages resulting from the use of this
' program. Use AS-IS at your own risk.
'
' The code is the property of the author. You may
' use the code and modify it, as far as this header
' remains intact. Further updates and other samples
' may be found on my site:
' http://www.borncity.de
'************************************************
Option Explicit

Dim WshObj

' Object for the Run-Method
Set WshObj = Wscript.CreateObject("WScript.Shell")

WshObj.Run "RunDll32.exe Diskcopy.dll,DiskCopyRunDll", _
1, true ' launch dialog
'* End

Additional information about this sample and the way how to access Windows functions may be found in my WSH books.

Back