ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Dawson <tdaw...@is.com>
Subject Re: Seaparate command window
Date Wed, 28 Feb 2001 19:30:19 GMT
With the hint from Bill Burton re: windows scripting host & Windows 2000, I
was able to build a quick script that does indeed launch a separate command
window.

To avoid setting off any virus detectors that purge VBS attachments for
messages, I'm including the script as inline text. Obviuosly, you'll need to
cut between the "---" and save as "launch.vbs" somewhere in your path.

---
Dim WSHShell,argCount,exeStr

set WSHShell=WScript.CreateObject("WScript.Shell")
argCount=0
exeStr="cmd /c"

while argCount < wscript.arguments.count

 exeStr = exeStr + " " + wscript.arguments(argCount) 
 argCount = argCount + 1
 
wend

WSHShell.run(exeStr)
---

then using it is as simple (relatively speaking) as following this example:

---
  <target name="startWLS">
    <exec dir="${install.dir}" executable="cmd"
          os="Windows 2000">
      <arg value="/c"/>
      <arg value="launch.vbs"/>
      <arg value="start"/>
      <arg value="startWebLogic.cmd"/>
    </exec>
  </target>
---

Tim

Mime
View raw message