- Код: выделить все
Set WshShell = WScript.CreateObject("WScript.Shell")
Return = WshShell.Run("xcopy /?", 1, true)
Set WshShell = Nothing
MsgBox "Понятна идея?"
Set WshShell = WScript.CreateObject("WScript.Shell")
Return = WshShell.Run("xcopy /?", 1, true)
Set WshShell = Nothing
MsgBox "Понятна идея?"
Return = WshShell.Run("cmd.exe /c xcopy /?", 1, true)
Set FSO = CreateObject("Scripting.FileSystemObject")
Set OS = CreateObject("Shell.Application")
Set OF = OS.NameSpace(FSO.CreateFolder("C:\NewFolder"))
OF.CopyHere "C:\OldFolder\*.*", False
Return = WshShell.Run("%comspec% xcopy /?", 1, true)
'Завершаем работу ТС
TCS.SendCommand "cm_Exit", True
'Ожидание завершения работы ТС
Do
WScript.Sleep 100
Loop While TCS.IsRunningTC
'Запускаем новый экземпляр программы
WshShell.Run TCexe
Option Explicit
Dim TCS, WshShell, TCexe, Timeout, QuitByTimeOut
Set TCS = CreateObject("TCScript.Helper")
Set WshShell = WScript.CreateObject("WScript.Shell")
TCexe = """" & TCS.TCPath & "\totalcmd.exe"""
'Завершаем работу ТС
TCS.SendCommand "cm_Exit", True
'Ожидание завершения работы ТС
Timeout = 5000 ' Сколько ждать выключения в мсек
Do
Timeout = Timeout - 100
If Timeout < 0 Then QuitByTimeOut = True: Exit Do
WScript.Sleep 100
Loop While TCS.IsRunningTC
'Запускаем новый экземпляр программы
If Not QuitByTimeOut Then WshShell.Run TCexe
Set TCS = Nothing
Set WshShell = Nothing
WScript.Quit
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 42