Hi,

I have a requirement to allow a privelidged user to reboot the server(WinXP OS).

I have code as follows:

Runtime runtime = Runtime.getRuntime();
Process proc = runtime.exec("cmd.exe /C shutdown -r -f -t 10");
int exitVal = proc.waitFor();

When called, the server does not shut down (although I get the exit code of 0) but if I run the same command from the XP 'run' window it works as expected.

I don't think it can be an access rights thing as I can use the same approach to set the system time and date successfully.

Any ideas?

Thanks,
Andy

_________________________________________________________________
Want to block unwanted pop-ups? Download the free MSN Toolbar now! http://toolbar.msn.co.uk/



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to