Tip & How-To about Computers & Internet

How to automatically set a System Restore point

Copy and save the following lines between "begin code" and "end of code" as NewRestorePoint.vbs:
' begin code

CONST DEVICE_DRIVER_INSTALL = 10
CONST BEGIN_SYSTEM_CHANGE = 100
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & strComputer & "ootdefault")
Set objItem = objWMIService.Get("SystemRestore")
Set objShell = CreateObject("WScript.Shell")
set objEnv = objShell.Environment("PROCESS")
objEnv("SEE_MASK_NOZONECHECKS") = 1
errResults = objItem.CreateRestorePoint _
("hepya.com restore point", DEVICE_DRIVER_INSTALL, BEGIN_SYSTEM_CHANGE)
objEnv.Remove("SEE_MASK_NOZONECHECKS")

' end of code

  • Now edit your Startup group (right click Start, choose Open All Users, double click Programs then Startup)
  • Copy or move the NewRestorePoint.vbs file above into that Startup folder

Voila! From now on, every time your computer starts up, you'll have a new System Restore Point, which is VERY useful if your computer starts acting up at any point after that!

Posted by on

Computers & Internet Logo

Related Topics:

Related Questions:

1 Answer

how to unblock website on my pc


Try this script by Amit Agarwal below. copy this script, open notepad and paste. Save as .vbs.

'Add the list of time wasting websites here
WebsitesToBlock = Array("twitter.com", "www.youtube.com", "www.facebook.com")
'-------------------------------------------------------------------
' LetMeWork.vbs - Stop Time Wasting Websites
' Author: Amit Agarwal http://www.labnol.org/
' This script will block /unblock time wasting sites with a click.
' Internally, it will edit the Windows hosts file on your computer.
' For suggestions, send me an email at amit@labnol.org
'-------------------------------------------------------------------
'-------------------------------------------------------------------
If WScript.Arguments.length =0 Then
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "wscript.exe", Chr(34) & WScript.ScriptFullName & Chr(34) & " RunAsAdministrator", "", "runas", 1
Else
Const ForReading = 1, ForWriting = 2

Set shell = CreateObject("WScript.Shell")
root = shell.ExpandEnvironmentStrings("%systemroot%")
hostFile = root & "\system32\drivers\etc\hosts"
tempFile = hostFile & ".bak"

blocked = 0
towrite = false

Set fso = CreateObject("Scripting.FileSystemObject")
Set f1 = fso.OpenTextFile(hostFile, ForReading, True)
Set f2 = fso.OpenTextFile(tempFile, ForWriting, True)

Do Until f1.AtEndOfStream

line = f1.Readline
towrite = true

For Each URL in WebsitesToBlock
If instr(line, URL) Then
If blocked = 0 Then
If left(line, 1) = "#" Then blocked = 1 Else blocked = 2
End If
towrite = false
End If
Next

If towrite Then f2.WriteLine line
Loop

For Each URL in WebsitesToBlock
If blocked <> 2 Then
f2.WriteLine "127.0.0.1" & vbTab & vbTab & URL
End If
Next

fso.Copyfile tempFile, hostFile

f1.Close
f2.Close

If blocked = 2 Then
WScript.echo "Time wasting websites have now been unblocked on this computer"
Else
WScript.echo "Time wasting websites are now blocked on this computer!"
End If
End If
' By Amit Agarwal http://www.labnol.org/

Jun 10, 2014 | Facebook Computers & Internet

1 Answer

I am not able to edit my basic info.


Hi, what basic info exactly are you talking about?
Computer owner / organisation?

If you would like to use a script to change your owner / organisation, please follow the steps below.

NOTE: Executing a .VBS script is usually not a good idea, unless you know what you are doing. Please carefully follow the instructions below.

Below is a custom script made to change your owner/organisation.
Press Start->Run
type notepad.exe, press Enter

copy and paste the following:

'ChgOwnOrg.vbs - Change Win9x Registered Owner/Organization.
'© Bill James - billjames.geo@yahoo.com - rev 29 Oct 1999.
'Modified for Windows XP

Option Explicit

Set ws = WScript.CreateObject("WScript.Shell")
Dim ws, t, p1, p2, n, g, cn, cg
Dim itemtype

p1 = "HKLM\Software\Microsoft\Windows NT\CurrentVersion\"

n = ws.RegRead(p1 & "RegisteredOwner")
g = ws.RegRead(p1 & "RegisteredOrganization")
t = "Change Owner and Organization Utility"
cn = InputBox("Type new Owner and click OK", t, n)
If cn <> "" Then
ws.RegWrite p1 & "RegisteredOwner", cn
End If

cg = InputBox("Type new Organization and click OK.", t, g)
If cg <> "" Then
ws.RegWrite p1 & "RegisteredOrganization", cg
End If

--- Stop copying here. DO NOT COPY THIS LINE ---

If you feel at all unsure, do not run this script. All it does it change your Owner and Organisation of the computer.

Save that file (in notepad) as "Change Info.vbs"
Note that you will have to change the "Save as type" to "All Files"

After you are done saving it, close notepad and double click "Change Info.vbs" and it will ask you to enter first your name, and then your organisation.

If this wasn't what you were asking about, or if you don't want to run a .vbs script (I can understand), please let us know.

Dec 14, 2009 | Computers & Internet

2 Answers

Funny UST Scandal


hi my friend got that last week to... ehat you need to do is download kaspersky. after running kaspersky. that will be gone. you can download kaspersky @ majorgeeks.com Here are some examples of autorun viruses which rely on the autorun function of Windows to infect PC’s and flash drives. Funny UST Scandal.avi.exe Autorun.vbs win32.autorun.k copy.exe imgkulot taga lipa are autorun.vbs recycler FS6519.dll.vbs strawberry from baguio W32/Perlovga (copy.exe | host.exe) VBS_RESULOWS.A Bha.dll.vbs w32automa worm (Autorun.vbs) Trojan.Win32.VB.atg | Win32/Dzan | Worm_vb.bnr (tel.xls.exe | mmc.exe) W32/RJump.worm (RavMonE) Worm.Win32.Delf.bf | W32.Fujacks (spoclsv.exe) W32.Fujacks.BH (****.vbs) WORM_AGENT.PGV (soundmix.exe) W32/Hakaglan.worm (RVHost.exe) Trojan.Win32.VB.ayo [AVP] (Macromedia_Setup.exe) Trojan.VBS.DeltreeY.b#1 (Destrukto!!! | destrukto.vbs) if you want to manually delete it... Solution is here: 1. Start Notepad [Start Menu-All Programs-Accessories-Notepad] or right-click any empty space in your desktop then select New-Text Document 2. Copy the following text. (note: Everything in between the square brackets should be in one line) REGEDIT4 [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionIniFileMappingAutorun.inf] @="@SYS:DoesNotExist" 3. Save the file with a name (anything) like DisableAutoRun.reg (The extension .reg is the important part) 4. Double Click your newly created registry file. Choose yes or continue to the warning that will appear. hope this helps

Jan 24, 2008 | Computers & Internet

Not finding what you are looking for?

122 people viewed this tip

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Doctor PC
Doctor PC

Level 3 Expert

7733 Answers

kakima

Level 3 Expert

102366 Answers

David Payne
David Payne

Level 3 Expert

14161 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Loading...