Main Forum > Tweaking.com Support & Help

Registry Backup Beta

<< < (16/79) > >>

Shane:
Ok try this  :cheesy:

Grab the attached file, extract it and replace the exe you have with it.

I have it to where it makes a file int he windows folder and updates the log and restore.cmd file

Try it out and see what you think :wink:

Shane

Ztruker:
Just to finish the thing with vol, this works:


--- Code: ---@echo off
set l=c:
vol %l% | find "C89E-70E8"
echo %l% errorlevel %errorlevel%
if %errorlevel% EQU 0 goto found

set l=d:
vol %l% | find "C89E-70E8"
echo %l% errorlevel %errorlevel%
if %errorlevel% EQU 0 goto found

set l=e:
vol %l% | find "C89E-70E8"
echo %l% errorlevel %errorlevel%
if %errorlevel% EQU 0 goto found

set l=f:
vol %l% | find "C89E-70E8"
echo %l% errorlevel %errorlevel%
if %errorlevel% EQU 0 goto found

set l=g:
vol %l% | find "C89E-70E8"
echo %l% errorlevel %errorlevel%
if %errorlevel% EQU 0 goto found

set l=h:
vol %l% | find "C89E-70E8"
echo %l% errorlevel %errorlevel%
if %errorlevel% EQU 0 goto found

"C89E-70E8" drive not found
goto done

:found
echo "C89E-70E8" is drive %l%

:done
--- End code ---

On my computer, C89E-70E8 is the VSN for my C: drive where Win 7 is installed and where I ran the reg backup. Doing it this way would not require you to write or look for a specific file. Just a suggestion.

There may be a way to put the above in a for loop but I couldn't figure out how to do it.

Shane:
Thats not a bad idea.

No file has to be made. Just have the program write the serial number of the drive in the restore.

I could use this api in the program to get it
http://msdn.microsoft.com/en-us/library/windows/desktop/aa364993%28v=vs.85%29.aspx


--- Quote ---lpVolumeSerialNumber [out, optional]

    A pointer to a variable that receives the volume serial number.

    This parameter can be NULL if the serial number is not required.

    This function returns the volume serial number that the operating system assigns when a hard disk is formatted.
--- End quote ---

But there is a drawback.

Some times windows gives the same ID!!!
http://www.sevenforums.com/hardware-devices/178466-two-drives-same-volume-serial-number.html

Perhaps making the file is a good idea.

Try the new exe for that and let me know. i attached it to a earlier post.

Shane

Ztruker:
See what you mean about VSN. If disk imaging is used to clone two drives or partitions then the VSN will be the same. Bummer. I don't know how to find the Disk Signature that same thread mentioned.

Tried the new exe. It still has both tests, so need to drop the first set.


--- Code: ---IF EXIST "K:\Windows\System32\Config\sam" set WindowsDrive=K:
IF EXIST "J:\Windows\System32\Config\sam" set WindowsDrive=J:
IF EXIST "I:\Windows\System32\Config\sam" set WindowsDrive=I:
IF EXIST "H:\Windows\System32\Config\sam" set WindowsDrive=H:
IF EXIST "G:\Windows\System32\Config\sam" set WindowsDrive=G:
IF EXIST "F:\Windows\System32\Config\sam" set WindowsDrive=F:
IF EXIST "E:\Windows\System32\Config\sam" set WindowsDrive=E:
IF EXIST "D:\Windows\System32\Config\sam" set WindowsDrive=D:
IF EXIST "C:\Windows\System32\Config\sam" set WindowsDrive=C:

IF EXIST "K:\Windows\tweaking.com-regbackup-DELL-P370.dat" set WindowsDrive=K:
IF EXIST "J:\Windows\tweaking.com-regbackup-DELL-P370.dat" set WindowsDrive=J:
IF EXIST "I:\Windows\tweaking.com-regbackup-DELL-P370.dat" set WindowsDrive=I:
IF EXIST "H:\Windows\tweaking.com-regbackup-DELL-P370.dat" set WindowsDrive=H:
IF EXIST "G:\Windows\tweaking.com-regbackup-DELL-P370.dat" set WindowsDrive=G:
IF EXIST "F:\Windows\tweaking.com-regbackup-DELL-P370.dat" set WindowsDrive=F:
IF EXIST "E:\Windows\tweaking.com-regbackup-DELL-P370.dat" set WindowsDrive=E:
IF EXIST "D:\Windows\tweaking.com-regbackup-DELL-P370.dat" set WindowsDrive=D:
IF EXIST "C:\Windows\tweaking.com-regbackup-DELL-P370.dat" set WindowsDrive=C:
--- End code ---

The problem still exists where I can have a multi-boot system and ran the backup from I: one time and from C: another.  Your test would always find the one on C: and copy the files saved from I: to C:.

As I mentioned before, I have Win 7, called DELL-P370 on I: and Win 8 Consumer Preview, also called DELL-P370 on I: I do it this way so the computer name is always the same on my network irregardless of which version I boot. Makes sharing much easier.

Ztruker:
Just had a new thought.

Take a page from ERUNT and create a folder under \Windows that holds the backups, removing the ability to specify where the backups are written. Then it's real simple to refer to directories using \.

attrib -h -s "\Windows\System32\Config\default"
attrib -h -s "Windows\System32\Config\default.old"
del "\Windows\System32\Config\default.old"
copy "\Windows\System32\Config\default" "\Windows\System32\Config\default.old"
del "\Windows\System32\Config\default"
copy "C\Windows\System32\Config\default" "\Windows\System32\Config\default"

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version