Main Forum > Tweaking.com Support & Help

Registry Backup Beta

<< < (22/79) > >>

Shane:
I have that in there in case a user deleted the file. Could happen. I do have it default to C: then it looks for the file.

I had it only go to K as just a starting point. I know Windows 7 repair option uses drive X: and it has a windows folder as well.

But with the custom file this wouldn't be a problem any more. Could also have it to where if a user did delete the custom file and it didnt find it then they would need to use the live cd option then.

If you think it will be better I will leave it as a default C: and remove the first set of checks. :wink:

Or should I remove the default C: as well?

Shane
Shane

Ztruker:
I would say remove the C: default as well. If the file isn't found abort the restore or as I suggested, prompt for the drive to restore to.

Just a suggestion. It's a good program that I think will be well received. I haven't tried it on XP yet but will do so soon.

Shane:
How does this look to you? I still need to test that I did the command code right


--- Code: ---@echo on
echo This file is only meant to be ran from the Windows Recovery Console. Do not run from with in Windows or it will just fail.

set BackupLocation=%CD%

IF EXIST "Z:\Windows\tweaking.com-regbackup-SMC2-Microsoft-Windows-7-Ultimate-(64-bit).dat" set WindowsDrive=Z:
IF EXIST "Y:\Windows\tweaking.com-regbackup-SMC2-Microsoft-Windows-7-Ultimate-(64-bit).dat" set WindowsDrive=Y:
IF EXIST "X:\Windows\tweaking.com-regbackup-SMC2-Microsoft-Windows-7-Ultimate-(64-bit).dat" set WindowsDrive=X:
IF EXIST "W:\Windows\tweaking.com-regbackup-SMC2-Microsoft-Windows-7-Ultimate-(64-bit).dat" set WindowsDrive=W:
IF EXIST "V:\Windows\tweaking.com-regbackup-SMC2-Microsoft-Windows-7-Ultimate-(64-bit).dat" set WindowsDrive=V:
IF EXIST "U:\Windows\tweaking.com-regbackup-SMC2-Microsoft-Windows-7-Ultimate-(64-bit).dat" set WindowsDrive=U:
IF EXIST "T:\Windows\tweaking.com-regbackup-SMC2-Microsoft-Windows-7-Ultimate-(64-bit).dat" set WindowsDrive=T:
IF EXIST "S:\Windows\tweaking.com-regbackup-SMC2-Microsoft-Windows-7-Ultimate-(64-bit).dat" set WindowsDrive=S:
IF EXIST "R:\Windows\tweaking.com-regbackup-SMC2-Microsoft-Windows-7-Ultimate-(64-bit).dat" set WindowsDrive=R:
IF EXIST "Q:\Windows\tweaking.com-regbackup-SMC2-Microsoft-Windows-7-Ultimate-(64-bit).dat" set WindowsDrive=Q:
IF EXIST "P:\Windows\tweaking.com-regbackup-SMC2-Microsoft-Windows-7-Ultimate-(64-bit).dat" set WindowsDrive=P:
IF EXIST "O:\Windows\tweaking.com-regbackup-SMC2-Microsoft-Windows-7-Ultimate-(64-bit).dat" set WindowsDrive=O:
IF EXIST "N:\Windows\tweaking.com-regbackup-SMC2-Microsoft-Windows-7-Ultimate-(64-bit).dat" set WindowsDrive=N:
IF EXIST "M:\Windows\tweaking.com-regbackup-SMC2-Microsoft-Windows-7-Ultimate-(64-bit).dat" set WindowsDrive=M:
IF EXIST "L:\Windows\tweaking.com-regbackup-SMC2-Microsoft-Windows-7-Ultimate-(64-bit).dat" set WindowsDrive=L:
IF EXIST "K:\Windows\tweaking.com-regbackup-SMC2-Microsoft-Windows-7-Ultimate-(64-bit).dat" set WindowsDrive=K:
IF EXIST "J:\Windows\tweaking.com-regbackup-SMC2-Microsoft-Windows-7-Ultimate-(64-bit).dat" set WindowsDrive=J:
IF EXIST "I:\Windows\tweaking.com-regbackup-SMC2-Microsoft-Windows-7-Ultimate-(64-bit).dat" set WindowsDrive=I:
IF EXIST "H:\Windows\tweaking.com-regbackup-SMC2-Microsoft-Windows-7-Ultimate-(64-bit).dat" set WindowsDrive=H:
IF EXIST "G:\Windows\tweaking.com-regbackup-SMC2-Microsoft-Windows-7-Ultimate-(64-bit).dat" set WindowsDrive=G:
IF EXIST "F:\Windows\tweaking.com-regbackup-SMC2-Microsoft-Windows-7-Ultimate-(64-bit).dat" set WindowsDrive=F:
IF EXIST "E:\Windows\tweaking.com-regbackup-SMC2-Microsoft-Windows-7-Ultimate-(64-bit).dat" set WindowsDrive=E:
IF EXIST "D:\Windows\tweaking.com-regbackup-SMC2-Microsoft-Windows-7-Ultimate-(64-bit).dat" set WindowsDrive=D:
IF EXIST "C:\Windows\tweaking.com-regbackup-SMC2-Microsoft-Windows-7-Ultimate-(64-bit).dat" set WindowsDrive=C:

IF DEFINED WindowsDrive GOTO start_process
IF NOT DEFINED WindowsDrive GOTO error_out

:start_process

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

attrib -h -s "%WindowsDrive%\Windows\System32\Config\sam"
attrib -h -s "%WindowsDrive%\Windows\System32\Config\sam.old"
del "%WindowsDrive%\Windows\System32\Config\sam.old"
copy "%WindowsDrive%\Windows\System32\Config\sam" "%WindowsDrive%\Windows\System32\Config\sam.old"
del "%WindowsDrive%\Windows\System32\Config\sam"
copy "%BackupLocation%\C\Windows\System32\Config\sam" "%WindowsDrive%\Windows\System32\Config\sam"

attrib -h -s "%WindowsDrive%\Windows\System32\Config\security"
attrib -h -s "%WindowsDrive%\Windows\System32\Config\security.old"
del "%WindowsDrive%\Windows\System32\Config\security.old"
copy "%WindowsDrive%\Windows\System32\Config\security" "%WindowsDrive%\Windows\System32\Config\security.old"
del "%WindowsDrive%\Windows\System32\Config\security"
copy "%BackupLocation%\C\Windows\System32\Config\security" "%WindowsDrive%\Windows\System32\Config\security"

attrib -h -s "%WindowsDrive%\Windows\System32\Config\software"
attrib -h -s "%WindowsDrive%\Windows\System32\Config\software.old"
del "%WindowsDrive%\Windows\System32\Config\software.old"
copy "%WindowsDrive%\Windows\System32\Config\software" "%WindowsDrive%\Windows\System32\Config\software.old"
del "%WindowsDrive%\Windows\System32\Config\software"
copy "%BackupLocation%\C\Windows\System32\Config\software" "%WindowsDrive%\Windows\System32\Config\software"

attrib -h -s "%WindowsDrive%\Windows\System32\Config\system"
attrib -h -s "%WindowsDrive%\Windows\System32\Config\system.old"
del "%WindowsDrive%\Windows\System32\Config\system.old"
copy "%WindowsDrive%\Windows\System32\Config\system" "%WindowsDrive%\Windows\System32\Config\system.old"
del "%WindowsDrive%\Windows\System32\Config\system"
copy "%BackupLocation%\C\Windows\System32\Config\system" "%WindowsDrive%\Windows\System32\Config\system"


attrib -h -s "%WindowsDrive%\Users\Default\ntuser.dat"
attrib -h -s "%WindowsDrive%\Users\Default\ntuser.dat.old"
del "%WindowsDrive%\Users\Default\ntuser.dat.old"
copy "%WindowsDrive%\Users\Default\ntuser.dat" "%WindowsDrive%\Users\Default\ntuser.dat.old"
del "%WindowsDrive%\Users\Default\ntuser.dat"
copy "%BackupLocation%\C\Users\Default\ntuser.dat" "%WindowsDrive%\Users\Default\ntuser.dat"

attrib -h -s "%WindowsDrive%\Users\User\AppData\Local\Microsoft\Windows\UsrClass.dat"
attrib -h -s "%WindowsDrive%\Users\User\AppData\Local\Microsoft\Windows\UsrClass.dat.old"
del "%WindowsDrive%\Users\User\AppData\Local\Microsoft\Windows\UsrClass.dat.old"
copy "%WindowsDrive%\Users\User\AppData\Local\Microsoft\Windows\UsrClass.dat" "%WindowsDrive%\Users\User\AppData\Local\Microsoft\Windows\UsrClass.dat.old"
del "%WindowsDrive%\Users\User\AppData\Local\Microsoft\Windows\UsrClass.dat"
copy "%BackupLocation%\C\Users\User\AppData\Local\Microsoft\Windows\UsrClass.dat" "%WindowsDrive%\Users\User\AppData\Local\Microsoft\Windows\UsrClass.dat"

attrib -h -s "%WindowsDrive%\Users\User\ntuser.dat"
attrib -h -s "%WindowsDrive%\Users\User\ntuser.dat.old"
del "%WindowsDrive%\Users\User\ntuser.dat.old"
copy "%WindowsDrive%\Users\User\ntuser.dat" "%WindowsDrive%\Users\User\ntuser.dat.old"
del "%WindowsDrive%\Users\User\ntuser.dat"
copy "%BackupLocation%\C\Users\User\ntuser.dat" "%WindowsDrive%\Users\User\ntuser.dat"

attrib -h -s "%WindowsDrive%\Windows\ServiceProfiles\LocalService\ntuser.dat"
attrib -h -s "%WindowsDrive%\Windows\ServiceProfiles\LocalService\ntuser.dat.old"
del "%WindowsDrive%\Windows\ServiceProfiles\LocalService\ntuser.dat.old"
copy "%WindowsDrive%\Windows\ServiceProfiles\LocalService\ntuser.dat" "%WindowsDrive%\Windows\ServiceProfiles\LocalService\ntuser.dat.old"
del "%WindowsDrive%\Windows\ServiceProfiles\LocalService\ntuser.dat"
copy "%BackupLocation%\C\Windows\ServiceProfiles\LocalService\ntuser.dat" "%WindowsDrive%\Windows\ServiceProfiles\LocalService\ntuser.dat"

attrib -h -s "%WindowsDrive%\Windows\ServiceProfiles\NetworkService\ntuser.dat"
attrib -h -s "%WindowsDrive%\Windows\ServiceProfiles\NetworkService\ntuser.dat.old"
del "%WindowsDrive%\Windows\ServiceProfiles\NetworkService\ntuser.dat.old"
copy "%WindowsDrive%\Windows\ServiceProfiles\NetworkService\ntuser.dat" "%WindowsDrive%\Windows\ServiceProfiles\NetworkService\ntuser.dat.old"
del "%WindowsDrive%\Windows\ServiceProfiles\NetworkService\ntuser.dat"
copy "%BackupLocation%\C\Windows\ServiceProfiles\NetworkService\ntuser.dat" "%WindowsDrive%\Windows\ServiceProfiles\NetworkService\ntuser.dat"


goto:eof

:error_out

ECHO Couldn't Find Which Drive Is Windows. Restore Cancled. Refer to help on Tweaking.com on what to do next.

goto:eof
--- End code ---

Shane

Shane:
Oh I am also adding the file size to the logs

[5/29/2012 - 8:50:42 PM] Backing Up File: C:\WINDOWS\System32\Config\software
[5/29/2012 - 8:50:42 PM] Result: Successful (23296 KB) - C:\RegBackup\NONE-816052AA76\5.29.2012_8.50.34-PM\C\WINDOWS\System32\Config\software

Shane

Shane:
OK tested it and worked in win 7 recovery console.

Both changes are done, new exe is uploaded. Same version. Just redownload.

Try it see if you like the changes :-)

Shane

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version