Solved

Scheduled Task Question (may not be the right area)

Posted on 2004-09-04
2
366 Views
Last Modified: 2008-01-09
Hi there,
   This question is probably simple to answer, and I feel foolish asking it.  I created a bat file that runs a couple of vbs scripts for a program (CoolMon2).  And, I set up the scheduled task to run it every two minutes, so the information is kept up to date.  The problem I'm having is, the dos prompt window comes up and stays up for the duration of the bat file.
   What is the command to make it run minimized?  Either the command in the scheduled task or a command to put in the bat file would be greatly appreciated.
   Thanks for all of your help.
Patrick.
0
Comment
Question by:alwayssmiling
[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
2 Comments
 
LVL 3

Accepted Solution

by:
raybass earned 125 total points
ID: 11983344
Even minimized sounds like a bore, having to look at it in the taskbar... blah

I'm not on a windows machine at the moment so I can't test this, but I think it could work if you ran it as a different user.  Just in case you don't know already, open up computer management, go to local users and groups, create a new user.  Add that user to the administrators group and set a decent password.  In the scheduled tasks dialog, tell it to run as that user.  I know that ntbackup works this way, it doesn't show on screen if you do it as a different user.  I don't know about other stuff.

Alternately, you could run the vbs file directly from scheduled tasks instead of a batch file.  That will definitely work.  If you have more than one to run, look up the syntax to call other programs from a vbs file and write another vbs file to replace the batch file that will run both the other scripts.

Good luck experimenting!
0
 
LVL 3

Author Comment

by:alwayssmiling
ID: 11983623
Thanks for your help.

In the end, I had to create a VBScript file, as the Run as a different user wouldn't work, with scheduled tasks.  

For someone else's reference (in the future), the commands I used were:

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run"NetStat20.vbs ",0
WshShell.Run"externalip.vbs",0

Works like a charm..  I don't even see the files run.. The only way I can even tell is occasionally, the External IP will disappear from CoolMon2 while the vbscript is updating.. Which is fine..

Patrick.
0

Featured Post

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

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

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
This article will help to fix the below error for MS Exchange server 2010 I. Out Of office not working II. Certificate error "name on the security certificate is invalid or does not match the name of the site" III. Make Internal URLs and External…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

724 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