dlchase Posted December 2, 2014 Share Posted December 2, 2014 We created an exe from Visual Studio that just opens a browser to a designated web page (.aspx file). The web page does some processing and then closes. We added running it from windows task scheduler and it runs fine. However, it leaves processes in the Task Manager called "iexplore.exe *32" for some reason. If I just run the exe by double clicking it it does not leave the "iexplore.exe *32" processes in Task Manager. It is freaky. Any ideas? Link to comment Share on other sites More sharing options...
MagicAndre1981 Posted December 2, 2014 Share Posted December 2, 2014 I also have this sometime when I close the Internet Explorer. Run taskkill/pskill to close the exe. Link to comment Share on other sites More sharing options...
dlchase Posted December 2, 2014 Author Share Posted December 2, 2014 Added a separate task job in scheduler that runs command below. TASKKILL /F /IM iexplore.exe Seems to work so far. Link to comment Share on other sites More sharing options...
MagicAndre1981 Posted December 2, 2014 Share Posted December 2, 2014 nice to hear this Link to comment Share on other sites More sharing options...
Tripredacus Posted December 3, 2014 Share Posted December 3, 2014 Ideally, your usage of taskkill should be run from within the EXE itself, rather than potentially leaving something behind in Task Scheduler. Hopefully you won't run into a situation where this task runs when it shouldn't. Link to comment Share on other sites More sharing options...
dlchase Posted December 3, 2014 Author Share Posted December 3, 2014 I would like to do it inside the exe but not sure how to do this. The exe opens IE to a specific web page. That web page runs some code to update accounting files from an SQL Server database. The web page is still running when the exe windows form closes so iexplore.exe is still running. The web page uses window.close in final code so that web page auto closes when updating is done. Below is my exe code in case you have any suggestions.Public Class Form1 Public Sub Main() Try Dim webAddress As String = "http://msnt01/BodyShop/Updater.aspx?from=vb" Dim P As Process = Process.Start(webAddress) P.WaitForInputIdle() P.Kill() Catch Finally Application.Exit() End Try End Sub Private Sub Form1_Load(sender As Object, e As System.EventArgs) Handles Me.Load Main() End SubEnd Class Link to comment Share on other sites More sharing options...
Tripredacus Posted December 3, 2014 Share Posted December 3, 2014 I do not use your language, however the theory would be the same. So the website itself will close the browser window. Your program can wait for the window to close. And then once it is closed, it can then kill the iexplore.exe process before exiting. Link to comment Share on other sites More sharing options...
Redhatcc Posted March 15, 2015 Share Posted March 15, 2015 I don't have any studio's open in front of me, but sample the code below:dim proc as ProcessStartInfo("cmd.exe")dim pr as Processpr=Process.Start(proc)pr.StandardInput.WriteLine("taskkill /f /im iexplorer.exe")Add that between the try/catch. The application will still close afterwards too (at least it should). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now