From: grooveska Date: 2007-06-27T04:54:47+09:00 Subject: Re: Ruby script that will restart a Windows server... Thanks for the reply Jano. I am just looking to create a ruby script that will do a local restart. Just write the ruby script, create a task in task scheduler and be done with it. I'll check out the links you've posted below. I'll take a look at the win32utils. I had forgotten about that project. On Jun 26, 2:48 pm, "Jano Svitok" wrote: > On 6/26/07, grooveska wrote: > > > I have been researching on how to write a script that will restart a > > Windows 2003 server. I haven't had much luck yet and was wondering if > > anyone else had done anything similar, and how you went about creating > > that script. > > Hi, > > it depends whether you want a local restart or a remote one. > > these can be useful:http://www.aumha.org/win5/a/shutcut.php(use `` to call)http://msdn2.microsoft.com/en-us/library/aa376868.aspx(use Win32API to call it)http://groups.google.co.nz/group/ruby-talk-google/browse_thread/threa... > > Maybe WMI has something as well... (use Win32OLE to access WMI) > > finally have a look at win32utils project at rubyforge.org - it may > already wrap the function for you. (if not, and you succeed with > wrapping, you may consider posting a patch for others to enjoy) > > Jano