Runtime exec (again)

2004-12-02 Thread andy wix
Hi, Still can't get this to work. There must be some reason why this won't run under Tomcat but does work stand-alone. To recap, I am trying to execute the following code on an Xp box with Tomcat 5.0.27: Process proc = runtime.exec(cmd.exe /C shutdown -r -f -m \\myPC -t 50); int exitVal =

Re: Runtime exec (again)

2004-12-02 Thread andy wix
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

RE: Runtime.exec security issue?

2004-11-30 Thread andy wix
Any further thoughts on this issue? There must be some reason why this won't run under Tomcat but does work stand-alone. To recap, I am trying to execute the following code on an Xp box with Tomcat 5.0.27: Process proc = runtime.exec(cmd.exe /C shutdown -r -f -m \\myPC -t 50); int exitVal =

Runtime.exec security issue?

2004-11-29 Thread andy wix
Hi, I am trying to run a simple exec command to open notepad with code as follows: Runtime runtime = Runtime.getRuntime(); Process proc = runtime.exec(C:\\WINDOWS\\system32\\notepad.exe); This code works fine from a stand-alone program but not run under Tomcat. I CAN successfully set the the

RE: Runtime.exec security issue?

2004-11-29 Thread andy wix
Hi Matt, I have tried running the Tomcat service with 'allow service to interact with desk top' checked in the service properties - I don't know if this should allow Tomat to know about Windows? Also, I don't think the application is actually getting launched as I don't see it in the processes

RE: Runtime.exec security issue?

2004-11-29 Thread andy wix
Hi, Actually, I was assuming this was a simple example of a runitme call. My real goal is to allow a privelidged user to re-boot the server with the following code: runtime.exec(cmd.exe /C shutdown -r -f -m \\myPC -t 50); I would also like to call a couple of batch files. These attempts have met

RE: Runtime.exec security issue?

2004-11-29 Thread andy wix
Hi, I've tried without the cmd.exe bit and also I have tried with the service set to run as Administrator. Cheers Andy _ Stay in touch with absent friends - get MSN Messenger http://www.msn.co.uk/messenger