Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Scheduled Task Question (may not be the right area)

Posted on 2004-09-04
2
Medium Priority
?
370 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 500 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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…
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Screencast - Getting to Know the Pipeline
Suggested Courses

963 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