Share this page 

Control Jaguar from the command line (this howto is deprecated)Tag(s): DEPRECATED

Starting with version 3.6.1, Sybase includes the jagtool utility. With this utility you can easily stop/restart a server, deploy or get a list of packages installed.

Jagtool is located in the %JAGUAR%\bin directory, the documentation is in jagtool.html in the sample directory.You may need to alter the jagtool.bat to fix the JAVA_HOME environment according to your installation.

Here a WSH script that call jagtool to extract a packages list (on localhost as jagadmin)and display the list in a MessageBox. It's a lot easier and faster than starting JagManager.

[jagpackages.vbs (located in %jaguar%\bin)]
Const TemporaryFolder = 2

strDOSCmd = "jagtool.bat list Package"
Set WSHShell = CreateObject("Wscript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
tempfile = fso.GetTempName
path = fso.GetSpecialFolder(TemporaryFolder)
tempfile = path & "\" & tempfile
WSHShell.Run _
   "%comspec% /c " & strDOSCmd & " >" & tempfile, 0, true
arResults = Split(fso.OpenTextFile(tempfile).ReadAll,vbcrlf)
fso.DeleteFile tempfile
WScript.Echo join(arResults,vbcrlf)
See this How-To