Despite encountering similar questions on different forums, I have yet to find a solution that resolves my specific issue.
In essence, I am looking to open a URL via the command prompt which will launch a browser, navigate to a webpage, and then automatically close.
Why do I require this functionality? I operate an application on IIS that requires daily routines to be executed. These routines can be initiated by visiting a specific URL like the one below:
The problem lies in the manual nature of this process. I am considering creating a batch file to launch the URL with "start ?", and scheduling a task in Windows to run this batch file daily. However, the browser does not close automatically after loading the page, resulting in multiple windows being left open.
My attempted solutions:
I have experimented with JavaScript to address this issue, but I consistently encounter the following message:
scripts may close only the windows that were opened by it
Despite using various JavaScript functions such as "window.close()", the windows do not close as intended.
Chrome and Firefox display this message, while Internet Explorer prompts me with a confirmation pop-up before closing the window.