Solved

Scheduled Task Question (may not be the right area)

Posted on 2004-09-04
2
361 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
2 Comments
 
LVL 3

Accepted Solution

by:
raybass earned 125 total points
Comment Utility
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
Comment Utility
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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

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…
A procedure for exporting installed hotfix details of remote computers using powershell
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now