candera / hobocopy

An open source backup tool for Windows
http://candera.github.com/hobocopy/
MIT License
176 stars 52 forks source link

There was a COM failure 0x8004230c - HoboCopy.cpp (361) #38

Open techuser opened 13 years ago

techuser commented 13 years ago

I am trying to use Hobocopy with command line...

hobocopy.exe /full "D:\OutlookArchive" "\uncpath\uncpath\uncpath\OutlookArchiveBackup\"

I have noticed that when I get the error message, it is putting an quotation mark at the end of the uncpath, but not at the beginning.

I am wondering if that is why I am getting this error message. I had this program working before. I have tried to uninstall and reinstall the Visual C++ run time components to see if that would help anything. I also have full access on the share's that it is copying from and copying too.

Any help would be appreciated.

techuser commented 13 years ago

After reading the following site http://www.howtogeek.com/howto/windows-vista/backupcopy-files-that-are-in-use-or-locked-in-windows/, I discovered that the Volume Shadow Copy Service was set to disabled.

VB.NET Code to Check to see if the Service's are Set to Disabled and then Change them to Manual. http://lea2mail.wordpress.com/2010/01/05/change-startup-type-and-status-of-the-windows-service-with-vb-net/

'VSS = Volume Shadow Copy ; swprv = Microsoft Software Shadow Copy Provider Dim MicrosoftSoftwareShadowCopyProviderSC As ServiceController Dim VolumeShadowCopySC As ServiceController MicrosoftSoftwareShadowCopyProviderSC = New ServiceController("swprv") VolumeShadowCopySC = New ServiceController("VSS")

    'SET THE MICROSOFT SHADOW COPY SERVICE TO MANUAL MODE SO THAT HOBOCOPY CAN USE VOLUME SHADOW
    Dim obj As ManagementObject
    Dim inParams As ManagementBaseObject
    Dim outParams As ManagementBaseObject
    Dim Result As Integer

    obj = New ManagementObject("\\.\root\cimv2:Win32_Service.Name='swprv'")

    'Change the Start Mode to Manual
    If obj("StartMode").ToString = "Disabled" Then
        Console.Write("Microsoft Software Shadow Copy Service is set to Disabled, Fixing..")
        'Get an input parameters object for this method
        inParams = obj.GetMethodParameters("ChangeStartMode")
        inParams("StartMode") = "Manual"

        'do it!
        outParams = obj.InvokeMethod("ChangeStartMode", inParams, Nothing)
        Result = Convert.ToInt32(outParams("returnValue"))

        If Result <> 0 Then
            Throw New Exception("ChangeStartMode method error code " & Result)
        End If
    End If

    'SET THE VOLUME SHADOW COPY SERVICE TO MANUAL MODE SO THAT HOBOCOPY CAN USE VOLUME SHADOW
    Dim obj2 As ManagementObject
    Dim inParams2 As ManagementBaseObject
    Dim outParams2 As ManagementBaseObject
    Dim Result2 As Integer

    obj2 = New ManagementObject("\\.\root\cimv2:Win32_Service.Name='VSS'")

    If obj2("StartMode").ToString = "Disabled" Then
        Console.Write("Volume Shadow Copy Service is set to Disabled, Fixing..")
        'Get an input parameters object for this method
        inParams2 = obj.GetMethodParameters("ChangeStartMode")
        inParams2("StartMode") = "Manual"

        'do it!
        outParams2 = obj2.InvokeMethod("ChangeStartMode", inParams2, Nothing)
        Result2 = Convert.ToInt32(outParams2("returnValue"))

        If Result2 <> 0 Then
            Throw New Exception("ChangeStartMode method error code " & Result2)
        End If
    End If
    'END OF SET THE VOLUME SHADOW COPY SERVICE TO MANUAL MODE SO THAT HOBOCOPY CAN USE VOLUME SHADOW

It might be helpful if HoboCopy had this added functionality within it's program, or at least display a message box to inform users that the program won't work because the needed services are set to disabled, and need to be at least set to Manual.

candera commented 13 years ago

Good suggestion. Thanks!

edmazing commented 13 years ago

http://img42.imageshack.us/img42/158/20110829055536pm.png

running this command> "C:\BINSVSS\HoboCopy.exe" /verbosity=4 "C:\Documents and Settings\Owner\Desktop" "C:\BINSVSS\BINS\OTHER"

COM failure 0x80042301 - HoboCopy.cpp (186)

what did I do wrong?

candera commented 13 years ago

It's not related to the problem you're having, but /verbosity=5 is not legal. The highest allowed value is 4. It would be interesting to see the output when run with /verbosity=4

As for the error itself, have you checked to see if the volume shadow service is running?

Pacerier commented 7 years ago

@edmazing Are you using a 32-bit hobocopy on a 64-bit Windows?

shawnlwy85 commented 11 months ago

image

tested on win7 64x, after enable relevant services , hobocopy can run now. hope it help you.