Solved

Scheduled task isn't opening a web browser

Posted on 2011-09-13
7
363 Views
Last Modified: 2012-05-12
I have a vbs script that is setup in a scheduled task that runs nightly.  It is supposed to open a web browser and go to a page that runs a script for us to update database information.  This task used to run fine, but recently it shows that the task ran and completed but looks like the web browser was never opened.  

I've tried setting up the task under the adminitrator and under a user with admin rights but neither seem to make a difference.

Here's the VBS file that we are using in the scheduled task.

Set wshShell = WScript.CreateObject("WScript.Shell")
wshShell.Run "iexplore http://mysite.com/mypage.aspx", 9
WScript.Sleep 3600000
wshShell.SendKeys "%F"
wshShell.SendKeys "C"

Open in new window

0
Comment
Question by:chshelpdesk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 12

Expert Comment

by:marcustech
ID: 36530353
Can you modify the VBS file to log it's progress to a text file after each line? This would at least narrow down the point at which it's failing.
0
 

Author Comment

by:chshelpdesk
ID: 36530553
Sure, could you send me a sample of how I would do that?
0
 
LVL 8

Expert Comment

by:Amitabh Singh
ID: 36530637
try this if its help you
 
Set wshShell = WScript.CreateObject("WScript.Shell")
wshShell.Run "cmd /c explorer http://google.com", 9
WScript.Sleep 10
wshShell.SendKeys "%F"
wshShell.SendKeys "C"

Open in new window

0
Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

 

Author Comment

by:chshelpdesk
ID: 36530827
Nope, that didn't work either.

As a note, the browser opens fine when I'm logged in.  But if I'm not logged in the browser will not open when the script runs.  Script shows as running successful though.
0
 
LVL 8

Expert Comment

by:Amitabh Singh
ID: 36536461
hmmm interesting , i know its possible to run cmd command and script via non interactive session (when user is not login )

but not sure about IE if their is possibility to run as non interactive session , i will test this in my Lab today i let you know after

but generally if you think about security point of view its: not possible to run any slandered GUI application  via schedule task when user is not login , its same like you want to run Microsoft word  as schedule task and some one delete some data on your server by using this !
0
 
LVL 12

Accepted Solution

by:
marcustech earned 250 total points
ID: 36539401
I'd imagine the browser wants an interactive session logged in in order to start, in which case you might find you either need to leave the session logged in, or use a command line http client, which actually seems like a more logical approach anyway. To write to a text file this should work:
 But I'm not sure it will actually be very informative to be honest.
0
 

Author Comment

by:chshelpdesk
ID: 36544169
@marcustech, looks like the command line approach works great.  Although for windows 2003 the command looks to be tinget.

Thanks!!
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I guess it is not common knowledge to most Wintel engineers/administrators: If you have an SNMP-based monitoring system in your environment (and it's common to have SNMP or Syslog) it's reasonably easy to enable monitoring of the Windows Event logs,…
On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question