Computing.Net > Forums > Programming > VBS error 0x8004100A

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

VBS error 0x8004100A

Reply to Message Icon

Name: Noddy
Date: April 3, 2009 at 06:22:17 Pacific
OS: Windows XP Pro
CPU/Ram: 1 GB
Subcategory: General
Comment:

This error code I cannot figure and the reason is that I know zero about vbs :-)
I'm trying to run an old vbs that was written many years ago and do not know where to start scratching.
It is that basic vbs to enable an automatic restore point at bootup:
--------------------------------------------
' Creates a SR point during the first startup of the day
' December 18, 2005
' For Windows® XP
' © 2005 Ramesh Srinivasan
' Website: http://windowsxp.mvps.org

Option Explicit
Dim SRP, CSRP, objWMI, clsPoint
Dim RPDate, D1, D2, dtmInstallDate, DMatch
DMatch = 0
Set SRP = getobject("winmgmts:\\.\root\default:Systemrestore")
Set dtmInstallDate = CreateObject("WbemScripting.SWbemDateTime")
Set objWMI = getobject( _
"winmgmts:\\.\root\default").InstancesOf ("systemrestore")
For Each clsPoint In objWMI
RPDate = getmytime(clsPoint.creationtime)
D1 = Month(RPDate) & "/" & Day(RPDate) & "/" & Year(RPDate)
D2 = Month(Date) & "/" & Day(Date) & "/" & Year(Date)
If D1 = D2 Then DMatch = 1
Next

Function getmytime(wmitime)
dtmInstallDate.Value = wmitime
getmytime = dtmInstallDate.GetVarDate
end Function

If DMatch = 0 Then
CSRP = SRP.createrestorepoint ("Daily Restore Point", 0, 100)
End If
--------------------------------------------

The error pop-up reads:
Line: 11
Char: 1
Error: 0x8004100A
Code: 8004100A
Source: (null)

I'ved Googled but running in circles cause I do not know what I'm looking for.
I'm using XP Pro and other vb scripts executes fine.
Any tips most welcome.



Reply to Message Icon

Related Posts

See More


Batch Directory Auto-Sort... batch file help



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Google Ads



Results for: VBS error 0x8004100A

VB Errors in MS Office www.computing.net/answers/programming/vb-errors-in-ms-office/9439.html

VB error with a component www.computing.net/answers/programming/vb-error-with-a-component/1258.html

On Error in VB www.computing.net/answers/programming/on-error-in-vb/9139.html