Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Volume Shadow Copy

Status
Not open for further replies.

hammb

MIS
Nov 6, 2006
2
US

I am trying to figure out a way to utilize the Volume Shadow Service (Volume Shadow Copy) to create my own custom interface much like ntbackup. I've seen some examples in vbscript but I am looking for something in VB6. I found the reference in VB6 to the Volume Copy Service Run-Time Library but I don't have a clue where to go from here. I would like some basic examples if possible and I can take it from there. I've spent many hours researching this topic without much luck.

Thanks,
B
 
I'm guessing that you'cve seen WMI solutions in VBscript, examining things like Win32_ShadowProvider and Win32_ShadowCopy.

Be aware that:

a) You can use these from VB as well
b) The Volume Shadow Service library that you can reference from VB doesn't provide enough functionality to get the info you want (at least,. I've never managed it)
c) Most of the info is only available from Vista and W2K3 machines.

Example:
Code:
[blue]Private Sub Command1_Click()
    Dim strComputer As String
    Dim objWMIService As Object
    Dim colItems As Object
    Dim ObjItem As Object
    
    strComputer = "yourvistaorw2k3server"
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    Set colItems = objWMIService.ExecQuery("Select * from Win32_ShadowProvider")
    For Each ObjItem In colItems
        Debug.Print "Name: " & ObjItem.Name
        Debug.Print "CLSID: " & ObjItem.CLSID
        Debug.Print "ID: " & ObjItem.ID
        Debug.Print "Type: " & ObjItem.Type
        Debug.Print "Version: " & ObjItem.Version
        Debug.Print "Version ID: " & ObjItem.VersionID
        Debug.Print
    Next
End Sub[/blue]

 
Is there any way to get this to work in Windows XP as well?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top