• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Automatically saving a registry key

WyteWatt

Banned
How do you save just one registry key automatically without being by your computer? I know you can do it manually but is there anyway to do it automatically? Only one registry key not the whole registry.
 
i am not certain that there is any tool that ships with windows to do this remotely, perhaps you can tell us why you want to do this?

you can export a key from the command line using:
REG EXPORT KEY Filename

and you could stick it in a batch file, perhaps
but it only works on the local machine.

Also, a custom application could probably be made pretty easily to accomplish variations on this...
 
Verdant I would love to tell you why I would like to do this.

You know Outlook Express Rules well they are stored within the registry and I would like to automatically backup that one registry key every 1 minute because I am constantly updating my message rules to organize my email. I want to make sure I keep a backup copy thats up to date so I never have to add them again.
 
How would you create a batch file to backup one registry key automatically every one minute in the background so no one can see it and it does it silently? Also could I do this for more than one registry key if need be? How if I can?
 
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:
  1. Control Panel->Scheduled Tasks (open the window, not the wizard)
  2. right-click in the empty space, then new->scheduled task
  3. give it a name
  4. Right Click the new Task->Properties
  5. Click Browse... and select runhide.exe from its new home
  6. in the start in box, enter the directory that the files are in
  7. Append the batchfile name to the end of the run command with a space, ie: C:\ERuleBackup\runhide.exe backupreg.bat
  8. Set the Run As information as you need... (probably need admin)
  9. Click the schedule tab, choose daily, starting at 12:00 AM
  10. Click the Advanced Button...
  11. Check Repeat Task
  12. Choose Every "1 minutes" (or more if you choose)
  13. Select Duration of "24 hours"
  14. Click OK
  15. Click ok to close the task properties dialog.
  16. You may be prompted for the run as account's password, go ahead
  17. 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
 
Thanks.

What files do I need to get runhide to work?

I know its the vb runtime files and tired instaling those but still can't get it to work. Keeps giving me the error:

Runtime-error 53

File Not found


I restarted after installing the vb runtime files but still same error. It works just not through the runhide exe yet.
 
Originally posted by: imtim83
Thanks.

What files do I need to get runhide to work?

I know its the vb runtime files and tired instaling those but still can't get it to work. Keeps giving me the error:

Runtime-error 53

File Not found


I restarted after installing the vb runtime files but still same error. It works just not through the runhide exe yet.

the file not found error is because it can't find the "argument" file
make sure you have
C:\BACKUP\runhide.exe backupreg.bat
or
"C:\Program Files\BACKUP\runhide.exe" backupreg.bat
in your "run" command for the scheduled task
if it is in a long directory named folder

if you start runhide.exe with no arguments it will give you the filenotfound error...
its just a 30 second application, apologies its not something fancier!

 
i have made a new version of runhide that does some basic error checking and provides slightly more useful error dialogs
its at the same link:

Here
 
Originally posted by: Verdant
Originally posted by: imtim83
Thanks.

What files do I need to get runhide to work?

I know its the vb runtime files and tired instaling those but still can't get it to work. Keeps giving me the error:

Runtime-error 53

File Not found


I restarted after installing the vb runtime files but still same error. It works just not through the runhide exe yet.

the file not found error is because it can't find the "argument" file
make sure you have
C:\BACKUP\runhide.exe backupreg.bat
or
"C:\Program Files\BACKUP\runhide.exe" backupreg.bat
in your "run" command for the scheduled task
if it is in a long directory named folder

if you start runhide.exe with no arguments it will give you the filenotfound error...
its just a 30 second application, apologies its not something fancier!


Ok I tried that but now whenever the schedule task runs it runs without any errors but no file is ever created? I tried searching for it to make sure it wasn't put anywhere else but it wasn't.

 
when you run the batchfile directly it works?
is the batchfile in the same directory as the runhide application?

does task scheduler say it started successfully? (requires detailed view in the task scheduler window)
 
Originally posted by: Verdant
when you run the batchfile directly it works?
is the batchfile in the same directory as the runhide application?

does task scheduler say it started successfully? (requires detailed view in the task scheduler window)



First Question: Yes
Second: Yes
Third: It doesn't say anything in the detailed view but it doesn't say it failed like it did before.
 
Back
Top