Hello,
See below ...
Tim Dawson wrote:
>
> 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
Cool! Thanks for sharing this. Since the user can change the WSH
defaults, it would be better to invoke the wscript.exe executable
directly. For instance:
<target name="startWLS">
<exec dir="${install.dir}" executable="wscript"
os="Windows 2000">
<arg value="//nologo"/>
<arg value="launch.vbs"/>
<arg value="start"/>
<arg value="WebLogic Server"/> <!-- window title -->
<arg value="startWebLogic.cmd"/>
</exec>
</target>
Also, this has the advantage that if it is run on a machine with no WSH
support installed, i.e. Windows NT or Windows 95, the nature of the
failure will be easier to determine.
-Bill