FIRST of ALL.. i hope you are running NT/2000/XP
😛
i figured out a way with a batch file, but it doesn't hide the dos prompt, so i made a 1 line VB program to run a program hidden
you can download it here:
Here
its an exe, if you don't trust me, its a very easy program to write, it has two lines, shell(Command, vbHide) and end
it requires the vb runtime files
the batch file looks like:
for /f "tokens=1-4 delims=/ " %%a in ('date /t') do (set weekday=%%a& set day=%%b& set month=%%c& set year=%%d)
for /f %%a in ('time /t') do set ttime=%%a
set ttime=%ttime::=.%
REG EXPORT "HKEY_CURRENT_USER\Identities\{D254D8D6-1DFF-4BEF-9B04-69273288FC73}\Software\Microsoft\Outlook Express\5.0\Rules" "%day%-%month%-%year% %ttime%.reg"
Exit
you will need to put this into a batch file (it is included in the zip in the link above though) and modify the key that is copied as your user guid will be different.
Save these two files (runhide and the batch file in the directory you would like to save the backups to)
next you need to make a scheduled task:
- Control Panel->Scheduled Tasks (open the window, not the wizard)
- right-click in the empty space, then new->scheduled task
- give it a name
- Right Click the new Task->Properties
- Click Browse... and select runhide.exe from its new home
- in the start in box, enter the directory that the files are in
- Append the batchfile name to the end of the run command with a space, ie: C:\ERuleBackup\runhide.exe backupreg.bat
- Set the Run As information as you need... (probably need admin)
- Click the schedule tab, choose daily, starting at 12:00 AM
- Click the Advanced Button...
- Check Repeat Task
- Choose Every "1 minutes" (or more if you choose)
- Select Duration of "24 hours"
- Click OK
- Click ok to close the task properties dialog.
- You may be prompted for the run as account's password, go ahead
- right-click the task, and select run, to test it out, you should have a copy of the key you entered in the batchfile, in a .reg file in the folder you placed the runhide.exe and the batch file in.
if you want it to backup another key, add another copy of the REG EXPORT line to the batch file, you will need to differentiate the file name
currently it is:
%day%-%month%-%year% %ttime%.reg
which is: 04-05-2004 02.34.reg
you could add a prefix, something like
OErules-%day%-%month%-%year% %ttime%.reg