Archives for: January 2009
01/22/09
Query Scheduled Tasks using VBScript
For anyone who ever tried to query the scheduled tasks on a Windows machine using windows script host (e.g. vbscript) and received unexpected results or missing tasks, that is because there are two ways to work with scheduled tasks. One way uses the NetSchedule API set and the second uses the Task Scheduler COM interface. There is a scriptable interface for the NetSchedule API set, we know it as WMI.
How to make sure that a script is run using cscript
Most of the scripts I write are intended to be called from the command window using cscript.exe. Something like.....( the nologo argument gets rid of the title block that cscript spits outs everytime it runs )
C:\scripts>cscript /nologo someScript.vbs
Recently I ran into a situation where a script was being called using wscript.exe instead and the script was not acting properly. After a little research, I came up with this solution:
Scripts
This is somewhere I can post interesting snippets as I come across them. Hopefully some folks out there will find this helpful.
Search
Follow Me:
Categories
- All
- Web Technologies (2)
- PHP (1)
- Windows Scripting (37)
- Batch Scripts (13)
- Wsh Scripts (23)
Archives
- December 2009 (2)
- March 2009 (2)
- February 2009 (3)
- January 2009 (2)
- December 2008 (4)
- November 2008 (1)
- October 2008 (1)
- February 2008 (1)
- December 2007 (3)
- July 2007 (1)
- April 2007 (1)
- February 2007 (2)
- More...
Misc
Who's Online?
- Guest Users: 6




