VBScript to create "Restore Point" in Win7

bawldiggle

GrayGhost2 ret.
Pro User
VIP
Local time
3:23 AM
Messages
895
Location
Australia
A lot of drilling is required to create a restore-point.

This a sample VBscript I found in my research ...
Code:
Set IRP = getobject("winmgmts:\\.\root\default:Systemrestore")
strDescription = InputBox("Restore point description: ","My Restore Point")
MYRP = IRP.createrestorepoint (strDescription, 0, 100)
Code is rather sloppy -- not my style without declared variables and "Option Explicit"
sstrDescription variable needs to be handled if InputBox is cancelled.

Q1: Are these "methods" and "objects" kosher in Win7 32/64 and WinXP ?
Q2: what are the "createrestorepoint" arguments, ie, arg2 and arg3
Q3:
in VBA what would be the VBEditor DLL reference be ?
. (I use VBA for testing only and if I can install the DLL reference,
. ( maybe there will some function/method help for "createrestorepoint"
Q4: Am I in the appropriate forum ?
 

My Computer My Computer

At a glance

XP Pro (x86) | 7 HP (x86) & (x64) | 7 Pro (x64)
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Toshiba, Lenovo (laptops) + 4 rigs
OS
XP Pro (x86) | 7 HP (x86) & (x64) | 7 Pro (x64)

My Computer My Computer

At a glance

64-bit Windows 11 Pro for WorkstationsIntel i7-8700K OC'd to 5 GHz64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600...ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
Restore Point shortcut

You might like these better for creating a restore point instead.
Like it? -- love it! Thank you Shawn
VBS file runs as portable on thumb-drive too -- I was concerned about system root.

No doubt about it -- you are "the" man :cool:

Just saved me some time, and brain cells writing and testing.
 
Last edited:

My Computer My Computer

At a glance

XP Pro (x86) | 7 HP (x86) & (x64) | 7 Pro (x64)
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Toshiba, Lenovo (laptops) + 4 rigs
OS
XP Pro (x86) | 7 HP (x86) & (x64) | 7 Pro (x64)

My Computer My Computer

At a glance

Microsoft Windows 7 Home Premium 64-bit 7600IIx4 amd athelon 635 processor2x2gbati radeon HD 5450
Computer Manufacturer/Model Number
Hewlett packard/p6512uk
OS
Microsoft Windows 7 Home Premium 64-bit 7600
CPU
IIx4 amd athelon 635 processor
Motherboard
FOXCONN 2AA9
Memory
2x2gb
Graphics Card(s)
ati radeon HD 5450
Sound Card
(1) Realtek High Definition Audio (2) AMD High Definition
Monitor(s) Displays
samsung lcd tv 32"
Screen Resolution
1360x 768
Hard Drives
(1) WDC WD10 01FAES-60Z2A0 SATA Disk Device (2) Maxtor OneTouch USB Device (3) ST310003 33AS USB Device (4) WD My Book 1111 USB Device
PSU
?
Cooling
air!
Keyboard
wireless hp
Mouse
wireless Hp,optical
Internet Speed
1.10mb/s
Antivirus
MSE
Browser
Firefox
You're most welcome GrayGhost. :)

Sure thing Julian. I'll whip up a tutorial for that today with the same options, and post back with a link to it when finished.
 

My Computer My Computer

At a glance

64-bit Windows 11 Pro for WorkstationsIntel i7-8700K OC'd to 5 GHz64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600...ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
How do I determine "Disk Space Usage" ?


I am new to Restore-points by 3 days

My laptop's "Disk Space Usage" setting was zero.
I have opted for 10% allocation based on no knowledge of my own.
If I create a daily restore-point (or boot based) I guess the disk-space will be used up rather quickly, which could exterminate critical "foundation" RPs as the allocated space is exceeded.
I know I can remove individual RPs using CCleaner, but I have to remember to do it
I back up data daily, and with little or no system/program changes I do not see the merit in daily RPs just "because we do".

I have now , however, instigated a protocol of creating a RP before installing/uninstalling/updating, OS and programs.

Q: What is a rule of thumb for either proportional or absolute "Disk Space Usage" setting ?
-------
PC SPECS:
Computer Type:= Laptop
Manufacturer:= Toshiba Satellite C665
OS:= Windows 7 Home Premium, sp1 (Build 7601)
CPU:= Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz
Motherboard:= TOSHIBA Portable PC
Memory:= 2,806 MB
Graphics:= NVIDIA GeForce 315M *
Sound Card:= Speakers (Conexant SmartAudio H |
Monitors:= x1, Generic PnP
Screen Resolution:= 1366 X 768 - 32 bit
Hard Drives:= C: 585.4GB (used 32GB)
PSU:=
Cooling:= default fan
Keyboard:= default + Logitech K260
Mouse:= default + Logitech M210
Internet Speed:= ADSL2
Antivirus:= Bitdefender Internet Security 2013
Browser:= PaleMoon, Firefox 20.0, IE-9
Others:= USB Safely Remove, Metapad, ClipX,
7Zip, Classic Shell Start, Explorer++, FileSearchEX, KeyboardLEDS, CapsLock,
MalwareBytes, MyDefrag, PostBox,
 

My Computer My Computer

At a glance

XP Pro (x86) | 7 HP (x86) & (x64) | 7 Pro (x64)
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Toshiba, Lenovo (laptops) + 4 rigs
OS
XP Pro (x86) | 7 HP (x86) & (x64) | 7 Pro (x64)
GrayGhost,

With restore points, you have "Current usage" and what you set "Max usage" for what "Current usage" can get up to before automatically deleting older restore points to make room for a new one.

There's no set rule for what to set "Max usage" to other than how much you want to be able keep more restore points saved. A restore point is very roughly around 1.35GB in size to help figure about how much "Max usage" to set for how many restore points to keep.

http://www.sevenforums.com/tutorials/335-system-protection-change-disk-space-usage.html
 

My Computer My Computer

At a glance

64-bit Windows 11 Pro for WorkstationsIntel i7-8700K OC'd to 5 GHz64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600...ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone

My Computer My Computer

At a glance

64-bit Windows 11 Pro for WorkstationsIntel i7-8700K OC'd to 5 GHz64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600...ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
Back
Top