Solved

Starting a scheduled .CMD task minimized

Posted on 2009-04-09
4
455 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

708 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

19 Experts available now in Live!

Get 1:1 Help Now