Solved

Starting a scheduled .CMD task minimized

Posted on 2009-04-09
4
457 Views
Last Modified: 2012-05-06
Hello,

I have a scheduled task which runs c:\auto\myjob.cmd every 2 minutes.  I want to run that window minimized instead of looking at the dos screen everytime it runs.  I have already tried adding start /min "c:\auto\myjob.cmd" in the run property for the job, and all I get is "could not start".  The system is running windows2003 server.  Thanks.
0
Comment
Question by:electricd7
  • 3
4 Comments
 
LVL 67

Accepted Solution

by:
sirbounty earned 500 total points
ID: 24109781
Dim objshell : Set objShell = CreateObject( "Wscript.Shell")
objShell.Run "C:\auto\myjob.cmd", 2
'Can even add
'wscript.sleep 120000  ' to wait 2 minutes adn rerun...
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 24109785
That' is a vbscript by the way - name it
filename.vbs
0
 

Author Comment

by:electricd7
ID: 24109867
Perfect.
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 24109882
Glad I could help. Thanx for the grade! :^)
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
For loop to add numbers 3 73
User profile Size Report 3 72
Exchange 2003 converted to VM but now email does not work 5 67
Need to overwrite data when copy job is run 4 39
I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
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.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

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