From: Jano Svitok Date: 2007-06-27T04:48:17+09:00 Subject: Re: Ruby script that will restart a Windows server... 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/thread/a0f7ec27d255ed63 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