[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Scheduled task isn't opening a web browser

Posted on 2011-09-13
7
Medium Priority
?
367 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

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 1000 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Organizations create, modify, and maintain huge amounts of data to help their businesses earn money and generally function.  Typically every network user within an organization has a bit of disk space to store in process items and personal files.   …
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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

650 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