Main Forum > Tweaking.com Support & Help
Registry Backup Beta
Ztruker:
Here is a way to possibly simplify the dos_restore.batch file"
--- Code: ---@echo off
Rem Create the input command file for diskpart
echo list volume > tweak_diskpart_in.txt
echo exit >> tweak_diskpart_in.txt
Rem Run diskpart to get a list of volumes on this computer
diskpart < tweak_diskpart_in.txt | find "Partition" > tweak_diskpart_out.txt
Rem Process each line of output from diskpart. Extract the volume letter then
Rem pass that letter to CheckAndRun
for /F "eol=; tokens=2,3*" %%i in (tweak_diskpart_out.txt) do Call :CheckAndRun %%j
Goto Done
Rem See if the marker file is on the passed drive.
Rem Return to the calling for loop if not
Rem If yes then restore the registry to that drive.
:CheckAndRun
set WindowsDrive=
IF EXIST "%1:\Windows\tweaking.com-regbackup-DELL-P370-Microsoft-Windows-7-Professional-(64-bit).dat" set WindowsDrive=%1:
IF NOT DEFINED WindowsDrive goto :eof
echo Marker file found on %1
Rem
Rem Restore code goes here
Rem
set WindowsDrive=
IF EXIST tweak_diskpart_in.txt del tweak_diskpart_in.txt
IF EXIST tweak_diskpart_out.txt del tweak_diskpart_out.txt
exit /b
Rem Cleanup and end
:Done
IF EXIST tweak_diskpart_in.txt del tweak_diskpart_in.txt
IF EXIST tweak_diskpart_out.txt del tweak_diskpart_out.txt
--- End code ---
tweak_diskpart_in.txt has the diskpart commands in it:
--- Code: ---list volume
exit
--- End code ---
tweak_diskpart_out.txt will look something like this:
--- Code: --- Volume 1 D D370_D NTFS Partition 78 GB Healthy
Volume 2 E D370_E NTFS Partition 117 GB Healthy
Volume 3 F D370_F NTFS Partition 84 GB Healthy
Volume 4 System Rese NTFS Partition 100 MB Healthy System
Volume 5 C D370_C NTFS Partition 74 GB Healthy Boot
Volume 6 G D370_G NTFS Partition 698 GB Healthy
Volume 7 H D370_H NTFS Partition 542 GB Healthy Pagefile
Volume 8 I Win_8 NTFS Partition 78 GB Healthy
--- End code ---
This is for when you're bored and looking for something to play with :cheesy: :cheesy: :cheesy:
Shane:
Thats a cool idea.
Have you tested it in the recovery section of Vista or 7?
I know Xp recovery console commands where almost completely removed. Only very basic functions. But when I tested in Vista and 7 it looked like they had all the commands. But I haven't checked if everything will work.
I will look into this more down the road. I have to head out this Friday for a customer and 3 servers wont be back till Sat night.
So tonight I have 2 cigars ready :cheesy: and I will be hammering out the help files and hopefully some videos. My goal being to have things ready for a Sunday Release.
Shane
Ztruker:
No, I don't have a real XP system to play with. All I have is XP Pro running under Oracle Virtual Box. My computers are Win 7 (2) and Vista.
I know diskpart is a valid RC command in XP, Vista and Win 7 so it "should" work.
Shane:
In the recovery console in XP it wont. They have almost no commands in it. Thats why the restore.cmd file is just a straight C: copy command and nothing more.
Thankfully in vista and 7 they changed that.
I have VMware and have each flavor of Windows installed to help test my programs :-)
Shane
Shane:
These are the only commands support in the xp recovery console
http://support.microsoft.com/kb/314058
I also have the program apply a reg tweak for the recovery console to allow users to go to more than the Windows folder.
This will be explained in the help file.
I enable the set command in the reg
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/recovery_console_cmds.mspx?mfr=true
Then in the recovery console a user can do
set AllowAllPaths = true
This will then allow them to go to the reg backup folder.
Thankfully all of this has been changed in Vista and 7 :cheesy:
Shane
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version