Help - Search - Members
Full Version: Great little script!
Piriform Community Forums > Computer Help and Discussion > Software
slowday444
Was looking through some recent PC World Mags and ran across this to create restore points in XP or Vista. Vista requires a few more hoops to jump through though. Paste it exactly like I have it here in notepad and change it to .vbs Then save it to your desktop or documents. In XP just double click (or right>open) and there'll be a new restore point. If anyone wants it for Vista I'll type the directions tomorrow. Paste exactly how it is here!

rp = "Scripted Restore Point by " & WScript.ScriptName
GetObject("winmgmts:\\.\root\default:Systemrestore").CreateRestorePoint rp, 0, 100

Make sure everything is only on two lines. After I posted I saw where the "100" was on a different line. I don't think that will work.
smilingralph
I Think this:SysRestorePoint.exe does the same thing. smile.gif
slowday444
QUOTE(smilingralph @ Oct 30 2007, 11:02 PM) *
I Think this:SysRestorePoint.exe does the same thing. smile.gif

Oh, I like the notification that v1.1 provides, thanks!
JDPower
That script was recommended by TonyKlein a few days ago in another thread, very useful.

While were on the subject I stumbled across another useful script recently that I've been using alot. With one click it shows or hides all hidden files, system files and file extensions (the equivalent of going to Control Panel>Folder Options and ticking/unticking 'Do not show hidden files and folders', 'Hide protected operating system files' and 'Hide extensions for known file types')
I can't remember where I downloaded it from but the script is as follows (I assume just copy to notepad and save as a .vbs file):

CODE
' Script to toggle Windows Explorer display of hidden files,
' super-hidden files, and file name extensions

Option Explicit
Dim dblHiddenData, strHiddenKey, strSuperHiddenKey, strFileExtKey
Dim strKey, WshShell
On Error Resume Next

strKey = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
strHiddenKey = strKey & "\Hidden"
strSuperHiddenKey = strKey & "\ShowSuperHidden"
strFileExtKey = strKey & "\HideFileExt"

Set WshShell = WScript.CreateObject("WScript.Shell")
dblHiddenData = WshShell.RegRead(strHiddenKey)

If dblHiddenData = 2 Then
    WshShell.RegWrite strHiddenKey, 1, "REG_DWORD"
    WshShell.RegWrite strSuperHiddenKey, 1, "REG_DWORD"
    WshShell.RegWrite strFileExtKey, 0, "REG_DWORD"

Else
    WshShell.RegWrite strHiddenKey, 2, "REG_DWORD"
    WshShell.RegWrite strSuperHiddenKey, 0, "REG_DWORD"
    WshShell.RegWrite strFileExtKey, 1, "REG_DWORD"

End If
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.