Windows Scripts: Difference between revisions

From OpenPetra Wiki
Jump to navigation Jump to search
(Created page with '<pre> Dim FS, WSH, Anzahl Const Titel = "Automatische Datensicherung" Set FSO = CreateObject("Scripting.FileSystemObject") Set WSH = CreateObject("WScript.Shell…')
 
No edit summary
Line 10: Line 10:


     Set oExec1 = WSH.Exec(nDoc3PfadName & "-project=ndoc-base.ndoc")
     Set oExec1 = WSH.Exec(nDoc3PfadName & "-project=ndoc-base.ndoc")
    Set oExec2 = WSH.Exec(nDoc3PfadName & "-project=ndoc-trunk-2.ndoc")
    Set oExec3 = WSH.Exec(nDoc3PfadName & "-project=ndoc-trunk-3.ndoc")


     Do While Not oExec1.StdOut.AtEndOfStream
     Do While Not oExec1.StdOut.AtEndOfStream
Line 17: Line 15:
     Loop
     Loop
      
      
    Do While Not oExec2.StdOut.AtEndOfStream
      input2 = input2 & oExec2.StdOut.Read(1)
    Loop
   
    Do While Not oExec3.StdOut.AtEndOfStream
      input3 = input3 & oExec3.StdOut.Read(1)
    Loop
   
     Wscript.Echo input1
     Wscript.Echo input1
    Wscript.Echo input2
    Wscript.Echo input3
   
   
</pre>
      
      
     ---
     ---
      
      
<pre>
      
      
      
      

Revision as of 10:23, 17 Mayıs 2011


    Dim FS, WSH, Anzahl
    Const Titel = "Automatische Datensicherung"

    Set FSO = CreateObject("Scripting.FileSystemObject")
    Set WSH = CreateObject("WScript.Shell")

    Const nDoc3PfadName = """C:\Program Files (x86)\NDoc3\bin\NDoc3Console.exe"" "

    Set oExec1 = WSH.Exec(nDoc3PfadName & "-project=ndoc-base.ndoc")

    Do While Not oExec1.StdOut.AtEndOfStream
       input1 = input1 & oExec1.StdOut.Read(1)
    Loop
    
    Wscript.Echo input1
 
   ---
   
    
    
    Dim FS, WSH, Anzahl
    Const Titel = "Automatische Datensicherung"

    Set FSO = CreateObject("Scripting.FileSystemObject")
    Set WSH = CreateObject("WScript.Shell")

    Const nNantPfadName = """C:\Program Files\nant\bin\Nant.exe"" "

    WSH.CurrentDirectory = "C:\openpetra\trunk-2\"

    Set oExec = WSH.Exec(nNantPfadName & "generateSolution")
    
    Do While Not oExec.StdOut.AtEndOfStream
       input1 = input1 & oExec.StdOut.Read(1)
    Loop
    
    Wscript.Echo input1