Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 3346 invoked from network); 2 Dec 2004 17:06:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 2 Dec 2004 17:06:00 -0000 Received: (qmail 82584 invoked by uid 500); 2 Dec 2004 17:05:17 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 82566 invoked by uid 500); 2 Dec 2004 17:05:17 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 82547 invoked by uid 99); 2 Dec 2004 17:05:16 -0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=DNS_FROM_RFC_POST,MSGID_FROM_MTA_HEADER,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of stixwix@hotmail.com designates 64.4.35.20 as permitted sender) Received: from bay12-f20.bay12.hotmail.com (HELO hotmail.com) (64.4.35.20) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 02 Dec 2004 09:05:15 -0800 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Thu, 2 Dec 2004 09:05:03 -0800 Message-ID: Received: from 195.137.97.218 by by12fd.bay12.hotmail.msn.com with HTTP; Thu, 02 Dec 2004 17:04:25 GMT X-Originating-IP: [195.137.97.218] X-Originating-Email: [stixwix@hotmail.com] X-Sender: stixwix@hotmail.com From: "andy wix" To: tomcat-user@jakarta.apache.org Bcc: Subject: Re: Runtime exec (again) Date: Thu, 02 Dec 2004 17:04:25 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 02 Dec 2004 17:05:03.0370 (UTC) FILETIME=[109B7EA0:01C4D891] X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi, The shutdown command now works OK. There have been a few issues with this that I didn't have in the right combination. The Tomcat service must have suitable permissions. To do this: - Under control panel select Admin tools -> Services - Right click Apache Tomcat service and select properties - Select the logon tab - Under 'This account' select a user account with administrator role. Not that Windows 2K doesn't come with a shutdown command. There is one supplied with the Win2K resource kit. - The command must be run from the overloaded exec method that takes a String array as it will not work declared as a string. - Both output and error streams must be read otherwise the process will hang. (see http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html) - The code will not run from a batch file. Thanks for your help. Andy _________________________________________________________________ Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org