------ art_18401_20316580.1182887861131 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline You could just do `shutdown /r` On 6/26/07, grooveska <ryangs / mac.com> wrote: > > 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" <jan.svi... / gmail.com> wrote: > > On 6/26/07, grooveska <rya... / mac.com> 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 > > > -- "Hey brother christian with your high and mighty errand, Your actions speak so loud, I can't hear a word you're saying." -Greg Graffin (Bad Religion) ------ art_18401_20316580.1182887861131--