Solved

Scheduled Task Question (may not be the right area)

Posted on 2004-09-04
2
363 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
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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
P2V Windows NT/2000 SP4 3 1,824
Recreate New ADC 1 274
Problems executing VBS script in Windows 2000 16 173
Windows Services - Run a Program Grey Out 3 14
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…
SEO can be a real minefield to navigate, but there are three simple ways to up your SEO game just be re-assessing your content output.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

813 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

10 Experts available now in Live!

Get 1:1 Help Now