Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Denmark
    Posts
    347
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Xcopy and registry keys (WinXP.../Word)

    Hi,

    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...

    Example:
    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,
    RD


    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

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 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>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •