nu har jeg prøvet at udføre dette script
MsgBox("starting script...")
Set ObjDomain = GetObject("
WinNT://Mouse")
Set objShell = WScript.CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CreateTextFile("C:\backup.txt")
Set file = fso.OpenTextFile("C:\backup.txt", 2)
For each object in ObjDomain ' Look at each object
If object.class = "User" Then
MsgBox("Kopierer data for "& object.name)
strExecute = "xcopy ""C:\Documents and Settings\"& object.name &"\Lokale indstillinger\Application Data\Microsoft\Outlook"" ""H:\Documents and Settings\"& object.name &"\Lokale indstillinger\Application Data\Microsoft\Outlook"" /s/e/h/k/y/i/f/r/o/c"
file.WriteLine(strExecute)
'objShell.Run(strExecute)
strExecute = "xcopy ""C:\Documents and Settings\"& object.name &"\Foretrukne"" ""H:\Documents and Settings\"& object.name &"\Foretrukne"" /s/e/h/k/y/i/f/r/o/c"
file.WriteLine(strExecute)
'objShell.Run(strExecute)
strExecute = "xcopy ""C:\Documents and Settings\"& object.name &"\Dokumenter"" ""H:\Documents and Settings\"& object.name &"\Dokumenter"" /s/e/h/k/y/i/f/r/o/c"
file.WriteLine(strExecute)
'objShell.Run(strExecute)
strExecute = "xcopy ""C:\Documents and Settings\"& object.name &"\Application Data\Microsoft\Address Book"" ""H:\Documents and Settings\"& object.name &"\Application Data\Microsoft\Address Book"" /s/e/h/k/y/i/f/r/o/c"
file.WriteLine(strExecute)
'objShell.Run(strExecute)
End If
Next
og ved at åbne c:\backup.txt ser jeg dette indhold
xcopy "C:\Documents and Settings\Administrator\Lokale indstillinger\Application Data\Microsoft\Outlook" "H:\Documents and Settings\Administrator\Lokale indstillinger\Application Data\Microsoft\Outlook" /s/e/h/k/y/i/f/r/o/c
xcopy "C:\Documents and Settings\Administrator\Foretrukne" "H:\Documents and Settings\Administrator\Foretrukne" /s/e/h/k/y/i/f/r/o/c
xcopy "C:\Documents and Settings\Administrator\Dokumenter" "H:\Documents and Settings\Administrator\Dokumenter" /s/e/h/k/y/i/f/r/o/c
xcopy "C:\Documents and Settings\Administrator\Application Data\Microsoft\Address Book" "H:\Documents and Settings\Administrator\Application Data\Microsoft\Address Book" /s/e/h/k/y/i/f/r/o/c
xcopy "C:\Documents and Settings\Guest\Lokale indstillinger\Application Data\Microsoft\Outlook" "H:\Documents and Settings\Guest\Lokale indstillinger\Application Data\Microsoft\Outlook" /s/e/h/k/y/i/f/r/o/c
xcopy "C:\Documents and Settings\Guest\Foretrukne" "H:\Documents and Settings\Guest\Foretrukne" /s/e/h/k/y/i/f/r/o/c
xcopy "C:\Documents and Settings\Guest\Dokumenter" "H:\Documents and Settings\Guest\Dokumenter" /s/e/h/k/y/i/f/r/o/c
xcopy "C:\Documents and Settings\Guest\Application Data\Microsoft\Address Book" "H:\Documents and Settings\Guest\Application Data\Microsoft\Address Book" /s/e/h/k/y/i/f/r/o/c
xcopy "C:\Documents and Settings\Jesus Freak\Lokale indstillinger\Application Data\Microsoft\Outlook" "H:\Documents and Settings\Jesus Freak\Lokale indstillinger\Application Data\Microsoft\Outlook" /s/e/h/k/y/i/f/r/o/c
xcopy "C:\Documents and Settings\Jesus Freak\Foretrukne" "H:\Documents and Settings\Jesus Freak\Foretrukne" /s/e/h/k/y/i/f/r/o/c
xcopy "C:\Documents and Settings\Jesus Freak\Dokumenter" "H:\Documents and Settings\Jesus Freak\Dokumenter" /s/e/h/k/y/i/f/r/o/c
xcopy "C:\Documents and Settings\Jesus Freak\Application Data\Microsoft\Address Book" "H:\Documents and Settings\Jesus Freak\Application Data\Microsoft\Address Book" /s/e/h/k/y/i/f/r/o/c
xcopy "C:\Documents and Settings\SQLDebugger\Lokale indstillinger\Application Data\Microsoft\Outlook" "H:\Documents and Settings\SQLDebugger\Lokale indstillinger\Application Data\Microsoft\Outlook" /s/e/h/k/y/i/f/r/o/c
xcopy "C:\Documents and Settings\SQLDebugger\Foretrukne" "H:\Documents and Settings\SQLDebugger\Foretrukne" /s/e/h/k/y/i/f/r/o/c
xcopy "C:\Documents and Settings\SQLDebugger\Dokumenter" "H:\Documents and Settings\SQLDebugger\Dokumenter" /s/e/h/k/y/i/f/r/o/c
xcopy "C:\Documents and Settings\SQLDebugger\Application Data\Microsoft\Address Book" "H:\Documents and Settings\SQLDebugger\Application Data\Microsoft\Address Book" /s/e/h/k/y/i/f/r/o/c
xcopy "C:\Documents and Settings\Temp\Lokale indstillinger\Application Data\Microsoft\Outlook" "H:\Documents and Settings\Temp\Lokale indstillinger\Application Data\Microsoft\Outlook" /s/e/h/k/y/i/f/r/o/c
xcopy "C:\Documents and Settings\Temp\Foretrukne" "H:\Documents and Settings\Temp\Foretrukne" /s/e/h/k/y/i/f/r/o/c
xcopy "C:\Documents and Settings\Temp\Dokumenter" "H:\Documents and Settings\Temp\Dokumenter" /s/e/h/k/y/i/f/r/o/c
xcopy "C:\Documents and Settings\Temp\Application Data\Microsoft\Address Book" "H:\Documents and Settings\Temp\Application Data\Microsoft\Address Book" /s/e/h/k/y/i/f/r/o/c
Jeg er ikke den store xcopy-nørd, men tpo må da kunne svare på om den ikke burde kopiere ? Hver linje svarer til den commando der vil blive udført hvis jeg ikke havde udkommenteret (') dem.