Batch file for system restore XP and Vista, Any help would be greatly appriciated |
![]() ![]() |
Batch file for system restore XP and Vista, Any help would be greatly appriciated |
Jul 29 2008, 06:59 PM
Post
#1
|
|
|
GeekU Junior Posts: 92 OS: Windows 2000,XP, Vista |
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 Thank you for your help, in advanced. This post has been edited by bombasos2: Aug 1 2008, 01:43 PM |
|
|
Jul 31 2008, 09:15 AM
Post
#2
|
|
![]() Malware Expert Posts: 1,025 OS: Windows XP / Mandrake |
This is what the START command is for. See "START /?" for details.
|
|
|
Aug 2 2008, 12:27 PM
Post
#3
|
|
|
GeekU Junior Posts: 92 OS: Windows 2000,XP, Vista |
Thank you.
It turns out the Start command does fix that issue, however I kept using either IF or START but not both, the fix was CODE IF EXIST c:\windows\system32\restore\rstrui.exe START c:\windows\system32\restore\rstrui.exe
|
|
|
Aug 4 2008, 08:55 AM
Post
#4
|
|
![]() Malware Expert Posts: 1,025 OS: Windows XP / Mandrake |
Yes, that's exactly right. You probably want to abstract away the environmental variables like you did in your first code sample above. Also, using IF EXIST here means if the program doesn't exist, the user will not be informed. I'd do something like:
IF NOT EXIST %systemroot%\system32\restore\rstrui.exe echo "rstrui.exe not found!" & goto Menu start %systemroot%\system32\restore\rstrui.exe This post has been edited by Swandog46: Aug 4 2008, 08:56 AM |
|
|
![]() ![]() |
Similar Topics
| Topic Title | Replies / Views | Topic Information | |||||
|---|---|---|---|---|---|---|---|
![]() |
9 / 38,423 | 12th December 2008 - 07:07 PM Andy9406 started - last by worf51 |
|||||
![]() |
1 / 1,038 | 1st September 2007 - 05:14 PM dmb83fan41 started - last by dmb83fan41 |
|||||
![]() |
3 / 1,005 | 28th November 2007 - 12:37 PM mark.ison started - last by mark.ison |
|||||
![]() |
2 / 290 | 15th December 2008 - 07:25 PM tjnguyen started - last by tjnguyen |
|||||
|
Time is now: 8th January 2009 - 02:00 AM |
| Advertisements do not imply our endorsement of that product or service. The forum is run by volunteers who donate their time and expertise. We make every attempt to ensure that the help and advice posted is accurate and will not cause harm to your computer. However, we do not guarantee that they are accurate and they are to be used at your own risk. |