1.

Solve : copy registry key to disk?

Answer» <html><body><p>Hi <a href="https://interviewquestions.tuteehub.com/tag/guys-1014120" style="font-weight:bold;" target="_blank" title="Click to know more about GUYS">GUYS</a><br/><br/>Is there a way of copying a specific registry key to a drive on a computer (e.g. a usb drive) so that it can later be restored onto a new PC?<br/>What i'm looking to do is create an application for a <a href="https://interviewquestions.tuteehub.com/tag/piece-771048" style="font-weight:bold;" target="_blank" title="Click to know more about PIECE">PIECE</a> of software that takes a backup of all the relevant files and folders attached to the software, and relevant registry keys - so that it can be copied onto a new PC, with all the registry keys that have been backed up can replace the current ones.<br/><br/>CheersERUNT : <a href="http://pcug.org.au/boesen/ERUNT/ERUNT.htm">http://pcug.org.au/boesen/ERUNT/ERUNT.htm</a><br/><br/>But I don't know about your other specifics...You cannot take a registry from one system and use it on another and expect it to work.Can anyone guess what he's <a href="https://interviewquestions.tuteehub.com/tag/attempting-7266855" style="font-weight:bold;" target="_blank" title="Click to know more about ATTEMPTING">ATTEMPTING</a> to do ? ? ? Quote from: patio on September 12, 2010, 08:31:25 AM</p><blockquote>Can anyone guess what he's attempting to do ? ? ?<br/></blockquote> Quote<blockquote>But I don't know about your other specifics... </blockquote> <br/>I kinda expected this though <br/> <br/>  <br/> <br/>Come on guys, his request might be legit. I've had to copy registry keys from pc to pc a few times on my network. He could be working with some custom software that requires it.<br/><br/> Quote from: mrbishman on September 12, 2010, 05:36:47 AM<blockquote>Hi guys<br/><br/>Is there a way of copying a specific registry key to a drive on a computer (e.g. a usb drive) so that it can later be restored onto a new PC?<br/>What i'm looking to do is create an application for a piece of software that takes a backup of all the relevant files and folders attached to the software, and relevant registry keys - so that it can be copied onto a new PC, with all the registry keys that have been backed up can replace the current ones.<br/><br/>Cheers<br/></blockquote> <br/>Sounds like you're wanting to make an application portable. Check out this link: <a href="https://portableapps.com/node/16261">http://portableapps.com/node/16261</a><br/><br/>Also: <a href="https://www.vmware.com/products/thinapp/">http://www.vmware.com/products/thinapp/</a>don't worry... it's all very legit! lol<br/><br/>Basically I work with a piece of printing accounting software in my workplace. when the software is installed, it addsa few files to the C: drive, as well as adding a connection string registry key to the system within hkey_local_machine -which provides the credentials for connecting to an sql database (also set up during the installation software).<br/>I <a href="https://interviewquestions.tuteehub.com/tag/get-11812" style="font-weight:bold;" target="_blank" title="Click to know more about GET">GET</a> a lot of call from customers who decide they want to backup the system and its data and migrate it over to a new server - and i want to create an application that does this, and which would involve the following steps:<br/><br/>*Stop IIS and Print Spooler services<br/>* Copy 2 folders from C:\Program Files<br/>*Copy a specific registry key from tree within hkey_local Machine.<br/><br/>Once the software has been initially set up on the other server (takes 4 minutes with an .exe), I want the application to replace the files on the C: drive with the backed up files - likewise with the single registry key. <br/><br/>Comprende? lol<br/><br/><br/>It's easy to copy registry...<br/>The only issue, as meationed, is the key/values might not work on another computer depending on settings and locations. It's a bit odd to do this unless it's backup, tweaking, etc.<br/><br/>Go to the registry editor:<br/>1) Start &gt; Run &gt; type 'regedit' (without the <a href="https://interviewquestions.tuteehub.com/tag/quotes-1175233" style="font-weight:bold;" target="_blank" title="Click to know more about QUOTES">QUOTES</a>) and enter.<br/>2) Location the key or folder of registry keys/values and select.<br/>3) Go File &gt; Export<br/>4) Save file as something.reg and copy that onto the flash drive or where ever for backup.<br/>4) Simply double click the file to import the keys or your application could also call this file.<br/>Hi<br/><br/>What I'm thinking about is creating the interface in visual basic, and then using scripts to carry out all the procedures, rather than having to do each part manually.<br/>Is it possible to copy the registry keys using script? If so, do you know what kind it would be? ie.e VBscript, Windows scripting, etc. Quote from: mrbishman on September 16, 2010, 01:24:47 AM<blockquote>Hi<br/><br/>What I'm thinking about is creating the interface in visual basic, and then using scripts to carry out all the procedures, rather than having to do each part manually.<br/>Is it possible to copy the registry keys using script? If so, do you know what kind it would be? ie.e VBscript, Windows scripting, etc.<br/></blockquote> <br/>hmm... I would suggest reposting your question in the computer programming section of the forum. I don't know how many programmers regularly check this section and you would probably get a better answer from them.Well I'm not the best with VBScript, etc, but if I remember correctly...<br/><br/>HKEY_CURRENT_USER or HKCU <br/>HKEY_LOCAL_MACHINE or HKLM <br/>HKEY_CLASSES_ROOT or HKCR <br/>HKEY_USERS <br/>HKEY_CURRENT_CONFIG <br/><br/> Quote<blockquote>Dim objShell, Value<br/>Value = 0<br/><br/>' First create the object shell to work with<br/>Set objShell= WScript.CreateObject("WScript.Shell")<br/><br/>' Write a registry value (as a DWORD or whatever value it should be)<br/>objShell.RegWrite "HKLM\Software\AppName\Valuename", Value, "REG_DWORD"<br/><br/>' Read a registry value<br/>Value = objShell.RegRead ("HKLM\Software\AppName\Value")<br/><br/>' Remove a registry value<br/>objShell.RegDelete "HKLM\Software\AppName\Valuename"<br/><br/>' Remove the entire registry key<br/>objShell.RegDelete "HKLM\Software\AppName\"<br/><br/>WScript.Quit ' Tells the script to stop and exit.</blockquote> <br/>Hope that will help or at least give you an idea.<br/></body></html>


Discussion

No Comment Found