none
Como temporizar el cierre del Internet explorer RRS feed

  • Pregunta

  • Lo que quiero es evitar que el internet explorer permanezca abierto mas de 10 minutos, hay forma de forzarlo a que se cierre. Desde un .bat puedo matar el proceso internet explorer, pero como hago para que ese proceso se ejecute cada 10 minutos. El problema es que en mi trabajo la gente por pereza nunca cierra el internet explorer acumulando paginas y usando paginas con aplicaciones que al no ser refrescadas empiezan a dar problemas.

    viernes, 10 de abril de 2015 18:20

Respuestas

  • Saludos:

    Lo recommendable seria crear un servicio de Windows:

    https://msdn.microsoft.com/es-es/library/zt39148a%28v=vs.110%29.aspx

    Eso resolveria el asunto.

    Pero tambien puedes probar este sitio:

    http://www.autocloseidle.com/

    Espero ayude.

    JOSE LUIS


    Dios NO los llamo LAS DIEZ RECOMENDACIONES

    viernes, 10 de abril de 2015 18:52
  • Hola Allan Cordoba no se si tiene conocimiento de VB.net

    Imagen

    ahi te dejo mi proyecto con este proyecto cada 10 min se cierra Internet Explorer, con los siguiente codigo
    solo utilize
    1.Label
    2.progressBar

    3.Button

    4.backgroundworker

    5.NotifyIcon1

    Public Class Form1
        Private startTime As System.DateTime = DateTime.Now
    
        Private WithEvents myProcess As Process
    
       
    
        Private Sub BackgroundWorker1_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
            
    
    
            Dim i As Integer
            For i = 1 To 6000
                BackgroundWorker1.ReportProgress(i / 10)
                Threading.Thread.Sleep(100)
            Next
        End Sub
    
        Private Sub BackgroundWorker1_ProgressChanged(sender As Object, e As System.ComponentModel.ProgressChangedEventArgs) Handles BackgroundWorker1.ProgressChanged
    
            ProgressBar1.Value = e.ProgressPercentage
        End Sub
    
    
    
    
    
        Private Sub BackgroundWorker1_RunWorkerCompleted(sender As Object, e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BackgroundWorker1.RunWorkerCompleted
            Timer1.Stop()
    
            myProcess = New Process()
    
            myProcess.StartInfo.UseShellExecute = True
            myProcess.StartInfo.FileName = "cmd.exe"
            myProcess.StartInfo.CreateNoWindow = True
    
            myProcess.StartInfo.Arguments = "/Ctaskkill /im iexplore.exe"
    
            myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
            myProcess.EnableRaisingEvents = True
    
            myProcess.Start()
    
    
    
    
            internet()
        End Sub
    
        Private Sub ProgressBar1_Click(sender As Object, e As EventArgs) Handles ProgressBar1.Click
           
        End Sub
    
        Private Sub Timer1_Tick_1(sender As Object, e As EventArgs) Handles Timer1.Tick
            Dim diff As New TimeSpan()
            diff = DateTime.Now.Subtract(startTime)
            Label1.Text = diff.Hours & ":" & diff.Minutes.ToString("00") & ":" & diff.Seconds.ToString("00")
            Label1.Invalidate()
        End Sub
    
        Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
            internet()
        End Sub
        Private Sub internet()
            Label1.Text = "0:00:00"
            startTime = DateTime.Now
            Timer1.Enabled = True
            Timer1.Start()
            BackgroundWorker1.RunWorkerAsync()
    
    
    
        End Sub
    
        Private Sub NotifyIcon1_MouseDoubleClick(sender As Object, e As MouseEventArgs) Handles NotifyIcon1.MouseDoubleClick
            Show()
            NotifyIcon1.Visible = False
        End Sub
    
        Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
            Me.Visible = False
            NotifyIcon1.Visible = True
        End Sub
    
        Private Sub Button2_Click(sender As Object, e As EventArgs)
            BackgroundWorker1.CancelAsync()
        End Sub
    
        Private Sub Button3_Click(sender As Object, e As EventArgs)
            internet()
        End Sub
    End Class
    Link De Proyecto:https://drive.google.com/file/d/0B1VOh0AxEfmdaXVtQlZIMkNMNEk/view?usp=sharing

    sábado, 11 de abril de 2015 0:21

Todas las respuestas

  • Saludos:

    Lo recommendable seria crear un servicio de Windows:

    https://msdn.microsoft.com/es-es/library/zt39148a%28v=vs.110%29.aspx

    Eso resolveria el asunto.

    Pero tambien puedes probar este sitio:

    http://www.autocloseidle.com/

    Espero ayude.

    JOSE LUIS


    Dios NO los llamo LAS DIEZ RECOMENDACIONES

    viernes, 10 de abril de 2015 18:52
  • Hola Allan Cordoba no se si tiene conocimiento de VB.net

    Imagen

    ahi te dejo mi proyecto con este proyecto cada 10 min se cierra Internet Explorer, con los siguiente codigo
    solo utilize
    1.Label
    2.progressBar

    3.Button

    4.backgroundworker

    5.NotifyIcon1

    Public Class Form1
        Private startTime As System.DateTime = DateTime.Now
    
        Private WithEvents myProcess As Process
    
       
    
        Private Sub BackgroundWorker1_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
            
    
    
            Dim i As Integer
            For i = 1 To 6000
                BackgroundWorker1.ReportProgress(i / 10)
                Threading.Thread.Sleep(100)
            Next
        End Sub
    
        Private Sub BackgroundWorker1_ProgressChanged(sender As Object, e As System.ComponentModel.ProgressChangedEventArgs) Handles BackgroundWorker1.ProgressChanged
    
            ProgressBar1.Value = e.ProgressPercentage
        End Sub
    
    
    
    
    
        Private Sub BackgroundWorker1_RunWorkerCompleted(sender As Object, e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BackgroundWorker1.RunWorkerCompleted
            Timer1.Stop()
    
            myProcess = New Process()
    
            myProcess.StartInfo.UseShellExecute = True
            myProcess.StartInfo.FileName = "cmd.exe"
            myProcess.StartInfo.CreateNoWindow = True
    
            myProcess.StartInfo.Arguments = "/Ctaskkill /im iexplore.exe"
    
            myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
            myProcess.EnableRaisingEvents = True
    
            myProcess.Start()
    
    
    
    
            internet()
        End Sub
    
        Private Sub ProgressBar1_Click(sender As Object, e As EventArgs) Handles ProgressBar1.Click
           
        End Sub
    
        Private Sub Timer1_Tick_1(sender As Object, e As EventArgs) Handles Timer1.Tick
            Dim diff As New TimeSpan()
            diff = DateTime.Now.Subtract(startTime)
            Label1.Text = diff.Hours & ":" & diff.Minutes.ToString("00") & ":" & diff.Seconds.ToString("00")
            Label1.Invalidate()
        End Sub
    
        Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
            internet()
        End Sub
        Private Sub internet()
            Label1.Text = "0:00:00"
            startTime = DateTime.Now
            Timer1.Enabled = True
            Timer1.Start()
            BackgroundWorker1.RunWorkerAsync()
    
    
    
        End Sub
    
        Private Sub NotifyIcon1_MouseDoubleClick(sender As Object, e As MouseEventArgs) Handles NotifyIcon1.MouseDoubleClick
            Show()
            NotifyIcon1.Visible = False
        End Sub
    
        Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
            Me.Visible = False
            NotifyIcon1.Visible = True
        End Sub
    
        Private Sub Button2_Click(sender As Object, e As EventArgs)
            BackgroundWorker1.CancelAsync()
        End Sub
    
        Private Sub Button3_Click(sender As Object, e As EventArgs)
            internet()
        End Sub
    End Class
    Link De Proyecto:https://drive.google.com/file/d/0B1VOh0AxEfmdaXVtQlZIMkNMNEk/view?usp=sharing

    sábado, 11 de abril de 2015 0:21