Solved

Scheduled Task Question (may not be the right area)

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

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…
Riverbed Technology's webinar discusses networking for the cloud era with simplified SD-WAN cloud connectivity.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

821 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