Is the VBS code included correct to execute 'Create Restore Point'


We have an old VBS that executes a 'Create Restore Point' to Windows 8 Pro.  We wanted to use it for iour Windows 10 Pro computers.  Please the code below, will it execute the "Restore Point" correctly for Windows 10 Pro or what we have to modify?

Set IRP = getobject("winmgmts:\\.\root\default:Systemrestore")
MYRP = IRP.createrestorepoint ("My Restore Point", 0, 100)

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Shaun VermaakTechnical Specialist IVCommented:
Do not know about that VBS but you can use this
cmd.exe /k "wmic.exe /Namespace:\\root\default Path SystemRestore Call CreateRestorePoint "My Shortcut Restore Point", 100, 7", and click 

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rayluvsAuthor Commented:
Thanx seems the same as the script i posted....
rayluvsAuthor Commented:
Can an EE validate the code I placed if ok to use in Windows 10 Pro?
rayluvsAuthor Commented:
Thank you.

In summary  what I am asking is "if my 2 lines VBS code is correct to run under Windows 10".

Hope this helps clear up what I am looking for.

Thank you ion advance.
rayluvsAuthor Commented:
Though this was the answer, it doesn't check if the VBS is updated  to Windows 10, I will award since it's an equivalent.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 10

From novice to tech pro — start learning today.