Tnx all for replying...
I received an solution from someone...
Function dtmDate(RegParam)
'read from the registry using getbinaryvalue
Const HKEY_CLASSES_ROOT = &H80000000
Const HKEY_CURRENT_USER = &H80000001
Const HKEY_LOCAL_MACHINE = &H80000002
Const HKEY_USERS = &H80000003
Const HKEY_CURRENT_CONFIG = &H80000005
Dim a(7), oRegistry, oMethod, oInParam, oOutParam, objShell
Select Case RegParam
Case 1
sComputer = "."
sMethod = "GetBinaryValue"
hTree = HKEY_CURRENT_USER
sKey = "Software\Microsoft\Windows\CurrentVersion\NetCache\Shares\//vcn/vce-bebruroot\"
sValue = "LastSyncTime"
Case 2
sComputer = "."
sMethod = "GetBinaryValue"
hTree = HKEY_CURRENT_USER
sKey = "SOFTWARE\MICROSOFT\OFFICE\9.0\Outlook\Options\Backup\"
sValue = "last_backup"
Case 3
sComputer = "."
sMethod = "GetBinaryValue"
hTree = HKEY_LOCAL_MACHINE
sKey = "system\ControlSet001\Control\Windows"
sValue = "ShutdownTime"
End Select
Set oRegistry = GetObject("winmgmts:{impersonationLevel=impersonate}//" & _
sComputer & "/root/default:StdRegProv")
Set oMethod = oRegistry.Methods_(sMethod)
Set oInParam = oMethod.inParameters.SpawnInstance_()
oInParam.hDefKey = hTree
oInParam.sSubKeyName = sKey
oInParam.sValueName = sValue
Set oOutParam = oRegistry.ExecMethod_(sMethod, oInParam)
For iCount = 0 To UBound(oOutParam.Properties_("uValue"))
'WScript.Echo oOutParam.Properties_("uValue")(iCount)
a(iCount)=oOutParam.Properties_("uValue")(iCount)
Next
' Obtain local Time Zone bias from machine registry.
Set objShell = CreateObject("Wscript.Shell")
lngBiasKey = objShell.RegRead("HKLM\System\CurrentControlSet\Control\" _
& "TimeZoneInformation\ActiveTimeBias")
If UCase(TypeName(lngBiasKey)) = "LONG" Then
lngBias = lngBiasKey
ElseIf UCase(TypeName(lngBiasKey)) = "VARIANT()" Then
lngBias = 0
For k = 0 To UBound(lngBiasKey)
lngBias = lngBias + (lngBiasKey(k) * 256^k)
Next
End If
'here after blend into rmueller's demonstration
on error resume next
lngHigh=0
lngLow=0
for i=7 to 4 step -1
lngHigh=lngHigh*256+a(i)
next
for i=3 to 0 step -1
lngLow=lngLow*256+a(i)
next
if err.number<>0 then
dtmDate = #1/1/1601#
err.clear
else
If lngLow < 0 Then
lngHigh = lngHigh + 1
End If
If (lngHigh = 0) And (lngLow = 0 ) Then
dtmDate = #1/1/1601#
Else
dtmDate = #1/1/1601# + (((lngHigh * (2 ^ 32)) _
+ lngLow)/600000000 - lngBias)/1440
End If
End If
on error goto 0
End Function
This wat i needed to use the dates that some programs use to save date/time in the registry