Results 1 to 2 of 2
2005-05-27, 21:17 #1
- Join Date
- Aug 2002
- Thanked 0 Times in 0 Posts
Xcopy and registry keys (WinXP.../Word)
Would like with an Xcopy to copy from a "source" folder to a subset of destination folders, each retrieved from the registry keys if possible...
Xcopy.exe "...Source*.dot" "HKEY....Workgroup templates"
Xcopy.exe "...Source*.dot" "HKEY....Startup"
Xcopy.exe "...Source*.dot" "HKEY....Tools"
Is this possible? - suggestions??
Tia and a nice weekend,Bests,
PS: Wish there were a knob on the TV to turn up the intelligence. There's a knob called "brightness," but that doesn't work
2005-05-28, 18:41 #2
- Join Date
- Feb 2001
- Silicon Valley, USA
- Thanked 94 Times in 90 Posts
Re: Xcopy and registry keys (WinXP.../Word)
Do you want to use XCOPY in a batch file? I know that XCOPY probably has some features that aren't available in the FileSystemObject object model, but if you are only doing a very basic kind of copy, you could use VBScript, which is able to access the registry through the Windows Script Host. Here's an example of some old code that reads reads registry keys using the Windows Script Host in VBA (Re: export registry value alone!!!), and one that reads and writes registry keys (Re: Security Settings (6.0)). R2 posted some useful reference links in <post#=227477>post 227477</post#>.
If you like, you actually can use VBScript's TextStream to write out a batch file and then the shell object to execute it. This allows for highly adaptable (if potentially more error prone) code. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>