Solved

Starting a scheduled .CMD task minimized

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

Backup Solution for AWS

Read about how CloudBerry Backup fully integrates your backups with Amazon S3 and Amazon Glacier to provide military-grade encryption and dramatically cut storage costs on any platform.

Question has a verified solution.

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

Suggested Solutions

Recently, I had the need to build a standalone system to run a point-of-sale system. I’m running this on a low-voltage Atom processor, so I wanted a light-weight operating system, but still needed Windows. I chose to use Microsoft Windows Server 200…
This article was inspired by a question here at Experts Exchange (http://www.experts-exchange.com/Software/Photos_Graphics/Images_and_Photos/Q_28629170.html). The requirements stated in that question are (1) reduce the file size of a large number of…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

685 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