New
#20
How to delete restore point with vbscript?
Why do you want to use VBScript instead of a batch file?
I want to be able to delete the current restore point, create a new one and have the window close. The only batch file code that I can find leaves the window open and adding "Exit" at the end doesn't help:
Code:vssadmin delete shadows /for=c: /Quiet cmd.exe /k "wmic.exe /Namespace:\\root\default Path SystemRestore Call CreateRestorePoint "My Shortcut Restore Point", 100, 7"
I added a "pause" to the batch file and created elevated shortcut but the batch file does not run:
The whole problem with this is that "wmic" will not work without "cmd.exe /k" preceding it which open a second window which will not close.Code:CreateObject("wscript.shell").run("""D:\Programs\RestorePoint\PS.bat"""),0
Click here to download a ZIP file. Extract the files and double-click to run "Testing.vbs". No elevated shortcut is needed. See whether the batch file will run. It runs at my end.
Got that to run with remove "Echo." which I have used in the past, but for some reason, it gets kicked out on my PC.
BTW: Thanks....
You can create a restore point without "wmic" and "cmd.exe /k". See: Add Create Restore Point Context Menu in Windows 10
Try to combine my script with yours.
Due to my poor English comprehension, I don't know what you mean by "kicked out".