Friday, August 9, 2013

System Restore Point daily

Asalamu alaikum
Dosto aaj main aap k lye aik bohut he karamad trick laya hon aap nechy dye hovy script ko notepad main paste kar k es file ko "SR.VBS" k nam se save kar len aur phir es file ko "STARTUP" folder main rakh dain. ub jab b din main pehle bar computer on hoga aap ka computer us ka recovery point bna le ga. aap apny pc main majood SYSTEM RESTORE se us point ko restore kar sken gy es ka faida ye hy k jab b aap ka computer (window) khrab hony lge to aap system ke purnai date main restore kar len es se window purani halat main aa jaye ge. pasand aye to comments zror dena



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 
ALLAH Hafiz

0 comments:

Post a Comment