Solved

Starting a scheduled .CMD task minimized

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

895 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

13 Experts available now in Live!

Get 1:1 Help Now