Wscript.shell => run backup script and waiting for backup to complet 
Author Message
 Wscript.shell => run backup script and waiting for backup to complet

How can I make the Script wait for ntbackup completion to continue
executioin once that application finishes ?  It just kicks it off and
just exits, leaving the ntbackup runningat the moment.    Here is
how I invoke it.  Thanks in advance.

Bob

    run_date = month(now()) & "_" & day(now()) & "_" & year(now())
    set_desc = "Exchange_" & trim(run_date)
    log_name = "\\server\backups\exchange_daily_" & run_date & ".log"
    RunThis = "ntbackup backup DS \\SERVER IS \\SERVER /a /v /d " & set_desc
& " /b /t Normal /l " & log_name & " /e"
   set WshShell = wscript.CreateObject("wscript.shell")
    iReturn = WshShell.Run( RunThis,0 )
    set WshSell = nothing



Mon, 01 Sep 2003 03:02:44 GMT  
 Wscript.shell => run backup script and waiting for backup to complet
Have you tried:

iReturn = WshShell.Run( RunThis,0,True )

(see the Run method documentation)...

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup instead.
--

Quote:

> How can I make the Script wait for ntbackup completion to continue
> executioin once that application finishes ?  It just kicks it off and
> just exits, leaving the ntbackup runningat the moment.    Here is
> how I invoke it.  Thanks in advance.

> Bob

>     run_date = month(now()) & "_" & day(now()) & "_" & year(now())
>     set_desc = "Exchange_" & trim(run_date)
>     log_name = "\\server\backups\exchange_daily_" & run_date & ".log"
>     RunThis = "ntbackup backup DS \\SERVER IS \\SERVER /a /v /d " & set_desc
> & " /b /t Normal /l " & log_name & " /e"
>    set WshShell = wscript.CreateObject("wscript.shell")
>     iReturn = WshShell.Run( RunThis,0 )
>     set WshSell = nothing



Mon, 01 Sep 2003 03:38:27 GMT  
 Wscript.shell => run backup script and waiting for backup to complet
Of course I have not..  I am uncertain where the
documentation actually is..  :^)   Thanks..


Quote:
> Have you tried:
> iReturn = WshShell.Run( RunThis,0,True )
> (see the Run method documentation)...
> --
> Michael Harris
> Microsoft.MVP.Scripting



Fri, 05 Sep 2003 05:05:17 GMT  
 Wscript.shell => run backup script and waiting for backup to complet
The EXE links below are downloads of the complete documentation sets in HTMLHelp format - highly
recommended for offline use. The Tutorial and "...User's Guide" content is also included in the
downloaded documentation...

WSH 2.0 Tutorial
http://msdn.microsoft.com/scripting/windowshost/doc/wsTutorialTOC.htm
WSH Documentation
http://msdn.microsoft.com/scripting/windowshost/docs/reference/defaul...
http://msdn.microsoft.com/scripting/windowshost/wshdoc.exe

VBScript User's Guide
http://msdn.microsoft.com/scripting/vbscript/doc/vbstutor.htm
VBScript Documentation
http://msdn.microsoft.com/scripting/vbscript/techinfo/vbsdocs.htm
http://msdn.microsoft.com/scripting/vbscript/download/vbsdoc.exe

FileSystemObject User's Guide
http://msdn.microsoft.com/scripting/vbscript/doc/jsFSOTutor.htm
VBScript Run-Time Library Reference [FileSystemObject/Dictionary]
http://msdn.microsoft.com/scripting/vbscript/doc/VBSFSOTOC.htm

JScript User's Guide
http://msdn.microsoft.com/scripting/jscript/doc/jsconJScriptUsersGuid...
JScript Documentation
http://msdn.microsoft.com/scripting/jscript/techinfo/jsdocs.htm
http://msdn.microsoft.com/scripting/jscript/download/jsdoc.exe

WSC Tutorial
http://msdn.microsoft.com/scripting/scriptlets/doc/lettitle.htm
WSC Documentation
http://msdn.microsoft.com/scripting/scriptlets/serverdocs.htm
http://msdn.microsoft.com/scripting/scriptlets/wscdoc.exe

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup instead.
--


Quote:
> Of course I have not..  I am uncertain where the
> documentation actually is..  :^)   Thanks..



> > Have you tried:
> > iReturn = WshShell.Run( RunThis,0,True )
> > (see the Run method documentation)...
> > --
> > Michael Harris
> > Microsoft.MVP.Scripting



Fri, 05 Sep 2003 07:59:48 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Run backup script same time each day

2. running backup from a script

3. How to ... System Backup/Restore, Backup utilities

4. How to ... System Backup/Restore, Backup utilities

5. NT Backup / Systemstate backup error

6. Running a scheduled tasks (Backup)

7. Backup using a VBScript - Run defragmenter

8. wscript.shell in .asp to run ftp script

9. wscript.shell in .asp to run ftp script

10. script for backup

11. backup script

12. How to backup SQL Server 7.0 database using script

 

 
Powered by phpBB® Forum Software