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 =
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
but not displayed on the console.
-Original Message-
From: andy wix [mailto:[EMAIL PROTECTED]
Sent: 29 November 2004 09:45
To: [EMAIL PROTECTED]
Subject: Runtime.exec security issue?
Hi,
I am trying to run a simple exec command to open notepad with code as
follows:
Runtime runtime
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
You could be right. I still reckon that launching graphical programs from
tomcat is gonna be a bit dicey.
-Original Message-
From: andy wix [mailto:[EMAIL PROTECTED]
Sent: 29 November 2004 10:13
To: [EMAIL PROTECTED]
Subject: RE: Runtime.exec security issue?
Hi Matt,
I have tried
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
PROTECTED]
Sent: 29 November 2004 10:35
To: [EMAIL PROTECTED]
Subject: RE: Runtime.exec security issue?
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
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