Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding Message to a running console window

Status
Not open for further replies.

dseaver

IS-IT--Management
Jul 13, 2006
467
I have a script that calls Acronis True Image restore from the cmd console, the line follows. Is there a way to change the title to the window to "Do Not Close" and also, display "Do Not Close" on the line before True Image is called?

Code:
MyObj.Run """c:\program files\acronis\trueimageworkstation\trueimagecmd.exe"" /filerestore /asz:1 /index:1"
 
Is there also a way to log when this command completes itself?
 
I found logging options, just need the messaging
 
On the Same subject, how can I make the following line work, along with the first Requirement (Do Not Close Message)

Code:
dim
log = "D:\AcronisLogs\Restore" & month(date) & "_" & day(date) & "_" & year(Date) & ".log"

'Calls Acronis to restore the first backup store in the Acronis Secure Zone
Dim MyObj
Set MyObj=CreateObject("WScript.Shell")
MyObj.Run """c:\program files\acronis\trueimageworkstation\trueimagecmd.exe"" /filerestore /asz:2 /index:3 /log:" & log
 
FOund the error in the dim line, just the first request
 
Is it just not possible? From first post:
I have a script that calls Acronis True Image restore from the cmd console, the line follows. Is there a way to change the title to the window to "Do Not Close" and also, display "Do Not Close" on the line before True Image is called?

heres the whole script
Code:
' VBScript file for nightly Restoration of Acronis Backup
' Restores a predefined backup from the Acronis Secure Zone
' Creates a log file in D:\AcronisLogs





Const wshYes = 6
Const wshNo = 7
Const wshQuestionMark = 32
Set objShell = CreateObject("Wscript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")

'Creates Log Directory
strFolderPath = "D:\AcronisLogs\"
If objFSO.FolderExists(strFolderPath) Then
Else
	objFSO.CreateFolder(strFolderPath)
End If
	
'Warining Messages
objShell.Popup "The C: drive is currently being restored, please be aware that personal data (desktop and My Documents) on the C: will be temporarily stored on the D: drive, then moved back to the C: drive. As such, you are urged that you save to the D: drive, so there is no risk of your data being lost.", _
    10, "Scheduled Task", wshQuestionMark
objShell.Run "C:\scripts\Message.vbs" 

dim log
log = "D:\AcronisLogs\Restore_" & Right("0" & hour(time),2) & Right("0" & minute(time),2) &  "_" & Right("0" & Month(Date),2) & "_" & Right("0" & Day(Date),2) & "_" & Year(Date) & ".log"

'Calls Acronis to restore the first backup store in the Acronis Secure Zone
Dim MyObj
Set MyObj=CreateObject("WScript.Shell")
MyObj.Run("""c:\program files\acronis\trueimageworkstation\trueimagecmd.exe"" /filerestore /asz:2 /index:3 /log:" & log)

WScript.quit
 
try

MyObj.Run("cmd.exe /c start ""Do Not Close"" ""c:\program files\acronis\trueimageworkstation\trueimagecmd.exe"" /filerestore /asz:2 /index:3 /log:" & log)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top