Can I start and stop IIS 6.0 application pools on one machine from within Java code running on another machine? If so, how?
Use Java's facility to execute another program and use the command line tool such as
appcmd stop apppool /apppool.nam
appcmd start apppool /apppool.nam
(see http://technet.microsoft.com/en-us/library/cc732742(WS.10).aspx )
I believe you can do it using WMI. Please take a look http://msdn.microsoft.com/en-us/library/ms525309(v=vs.90).aspx
Or just google "iis wmi".
First find API you need and find a way to write JScript or VBScript that does what you need.
Then you have 2 ways.
Runtime.exec()
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.