dseaver
IS-IT--Management
- Jul 13, 2006
- 467
I create command string using the following
When I run the resulting string in cmd.exe, it creates the log file, but when its run using
The log file is not generated. any ideas how to fix this?
Code:
Dim LogFileName
LogFileName = "C:\Logs\RestoreLog-" & Replace(date(), "/", "_") &".txt"
Dim CommandStr
CommandStr = """C:\program files\acronis\trueimageworkstation\trueimagecmd.exe"" /filerestore /filename:""E:\Backup.tib"" >" & LogFileName & " 2>&1"
When I run the resulting string in cmd.exe, it creates the log file, but when its run using
Code:
Set MyObj=CreateObject("WScript.Shell")
MyObj.Run CommandStr
The log file is not generated. any ideas how to fix this?