OPTION EXPLICIT CONST VSSDIR = "c:\vssnetsu" CONST SSARC = "c:\program files\microsoft visual studio\vss\win32\ssarc.exe" CONST SSARC_PARAMS = "-d- -yADMIN -s" CONST LOGDIR = "c:\VSS_LOG" CONST BACKUPDIR = "c:\VSS_BACKUP" Dim objFSO Dim oShell Set objFSO = CreateObject("Scripting.FileSystemObject") Set oShell = WScript.CreateObject ("WSCript.shell") Call Main Sub Main() Dim szBackupFile Dim szLogFile Dim szCommand szBackupFile = objFSO.BuildPath(BACKUPDIR, "VSSBackup." & GetDate(Now) & ".ssa") szLogFile = objFSO.BuildPath(LOGDIR, "VSSBackup." & GetDate(Now) & ".log") szCommand = "CMD /C """ & SSARC & """ " & SSARC_PARAMS & VSSDIR & " " & szBackupFile & " $/ >> " & szLogFile WScript.Echo "Running SSARC..." oShell.Run szCommand, 0, true WScript.Echo "Backup finished." Set oShell = Nothing Set objFSO = Nothing End Sub Function GetDate(dtDate) Dim strNow strNow = Year(dtDate) If Len(Month(dtDate)) = 1 Then strNow = strNow & "0" & Month(dtDate) Else strNow = strNow & Month(dtDate) End If If Len(Day(dtDate)) = 1 Then strNow = strNow & "0" & Day(dtDate) Else strNow = strNow & Day(dtDate) End If GetDate = strNow End Function