Go Back   TechArena Community > Software > Windows Software
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , , , ,

Sponsored Links



Batch file for system restore XP and Vista

Windows Software


Reply
 
Thread Tools Search this Thread
  #1  
Old 20-01-2010
Beter 2 Burn Out's Avatar
Member
 
Join Date: Aug 2006
Posts: 136
Batch file for system restore XP and Vista

I have created the batch file which is related to the System Restore in Windows XP and the Windows Vista. When I try to open that file it opens properly in both the Windows XP and Vista, but after opening that batch file I am not able to return to main menu until I close system restore. I can press any key only after closing the batch file. And then I can return to the main menu. Does anyone know the coding so that I can go to the main menu without closing the batch files.?? So, if possible provide me batch file for System Restore of Windows XP and Vista.!!
__________________
AMD Sempron 2800+ @ 2Ghz
Asus A7V8X-LA
120Gb Seagate barracuda 7200Rpm Ultra-ATA 100
Elixir 512mb DDR Pc3200 (Soon 1Gb)
Club 3D Radeon 9600 256Mb
Lite-On Cd & Dvd writer combo
IDE-Dvd drive
400w Psu
Windows Xp Pro Sp2
Advent Wireless Mouse & Keyboard.
Reply With Quote
  #2  
Old 20-01-2010
Member
 
Join Date: May 2008
Posts: 1,990
Re: Batch file for system restore XP and Vista

It would be better if you provide the coding that you are using. Because to make the whole coding for the Batch file for system restore is very tedious. So if you provide me the coding, I can tell you that were exactly you will have to make the changes, if any. Also are you using the %system% in the batch file for restoring the system?
Reply With Quote
  #3  
Old 20-01-2010
Zecho's Avatar
Member
 
Join Date: May 2008
Posts: 2,267
Re: Batch file for system restore XP and Vista

I can give you the VBScript that need to create a system restore point by a batch file. I think that you should try this :
Code:
Set IRP = getobject("winmgmts:\\.\root\default:Systemrestore")
MYRP = IRP.createrestorepoint ("Restore", 0, 100)
Hope that you were looking for the same code.
Reply With Quote
  #4  
Old 20-01-2010
Beter 2 Burn Out's Avatar
Member
 
Join Date: Aug 2006
Posts: 136
Re: Batch file for system restore XP and Vista

Extremely Thanks Guys..!!! Really feeling good that so many are trying to help. Here is my code that I am trying to use :
Code:
runas /user:local\administrator
@echo off
title Test Utility
:prompt
color 4f
cls
echo Pick a Category
echo.
echo Type 1 to System Utilities
echo Type 2 to ""
echo Type 3 to ""
set /p answer=
if ‘%answer%’ == ‘1’ system
:system
cls
Echo Type 1 to System Restore
Echo Type 2 to ""
Echo Type 15 to Main Menu
set /p answer=
if '%answer%' == '1' goto system restore
:system restore
cls
IF EXIST %systemroot%\system32\restore\rstrui.exe= %systemroot%\system32\restore\rstrui.exe else
IF EXIST C:\Windows\System32\rstrui.exe = C:\Windows\System32\rstrui.exe
echo.
echo Pres Any Key to goto Menu
pause >nul
goto prompt
Please tell me where I went wrong or Am I missing something.??
__________________
AMD Sempron 2800+ @ 2Ghz
Asus A7V8X-LA
120Gb Seagate barracuda 7200Rpm Ultra-ATA 100
Elixir 512mb DDR Pc3200 (Soon 1Gb)
Club 3D Radeon 9600 256Mb
Lite-On Cd & Dvd writer combo
IDE-Dvd drive
400w Psu
Windows Xp Pro Sp2
Advent Wireless Mouse & Keyboard.

Last edited by Beter 2 Burn Out : 20-01-2010 at 08:19 PM.
Reply With Quote
  #5  
Old 20-01-2010
Member
 
Join Date: May 2008
Posts: 1,990
Re: Batch file for system restore XP and Vista

According to me your code should be
Code:
IF EXIST c:\windows\system32\restore\rstrui.exe START c:\windows\system32\restore\rstrui.exe
instead of
Code:
IF EXIST %systemroot%\system32\restore\rstrui.exe= %systemroot%\system32\restore\rstrui.exe else
IF EXIST C:\Windows\System32\rstrui.exe = C:\Windows\System32\rstrui.exe
Making these changes will definitely help you.
Reply With Quote
  #6  
Old 20-01-2010
Reegan's Avatar
Member
 
Join Date: Oct 2005
Posts: 2,299
Re: Batch file for system restore XP and Vista

The code that you used to make a batch file want to abstract away the environmental variables. Because I think that using the IF EXIST here means if the program doesn't exist, the user will not be informed. So I would like to suggest you to use the following code :
Code:
IF NOT EXIST %systemroot%\system32\restore\rstrui.exe echo "rstrui.exe not found!" & goto Menu start %systemroot%\system32\restore\rstrui.exe
Hope that your problem is fixed.!!
Reply With Quote
Reply

  TechArena Community > Software > Windows Software


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Batch file for system restore XP and Vista"
Thread Thread Starter Forum Replies Last Post
On PS3, hard disk's file system is corrupted, how to restore it? Jasthi Portable Devices 2 22-08-2011 10:37 AM
how to restore .zip file association & file icon in Vista? markwithak Vista Help 2 26-08-2009 06:42 PM
Automatic System Restore Malfunctioning, not creating restore points, vista premium JazzMac251 Windows Software 10 08-07-2009 10:54 AM
Vista Backup and Restore and System Restore points MrChris- Guides & Tutorials 1 05-01-2009 09:05 PM
How to install Atl service program using batch file on vista rajendersaini@gmail.com Vista Help 1 23-07-2007 07:50 PM


All times are GMT +5.5. The time now is 07:07 PM.