Sub NothingToDo_Reboot ' Add/Edit by Vincent1890 Dim o, oOS ' Executer un script powershell ' Copy logs and system files ' oShell.Run("powershell.exe -noexit -windowstyle hidden -file NothingToDo_Reboot_Actions.ps1") ' Reboot If oEnv("SystemDrive") = "X:" then ' Nothing to do, exiting will reboot Else ' Set oOS = GetObject("winmgmts:{(Shutdown)}//./root/cimv2").ExecQuery("select * from Win32_OperatingSystem where Primary=true") ' For Each o in oOS ' o.Win32Shutdown(6) ' Next End if End Sub