The XP schtasks.exe command-line tool is great for managing scheduled tasks. Win2K doesn't have an equivalent command-line tool. If you attempt to run schtasks.exe on a Win2K machine, you'll receive an error message indicating that you're using the incorrect OS version. You can modify schtasks.exe to work under Win2K by performing the following steps.
Open schtasks.exe in a hexadecimal editor such as BreakPoint Software's Hex Workshop 3.1.
Find code location CB2A, and change the hex value 75 to EB. If you're using Windows XP Service Pack 1 (SP1), the code location is 0x0000CC50 (not CB2A); if you're using XP SP2, the location is 0x0000E3F8. Updated 12-5-08: If you're using XP SP3, the location is 0x0000E391.
Save the file and exit the editor.
For cosmetic purposes, you can use Visual C++ or a resource editor such as Angus Johnson's Resource Hacker to change the error message
ERROR: The Target system must be running Windows XP or above.
to
ERROR: The Target system must be running Windows 2000 or above.
This error message is located in String Table 344.
Thanks to John Eccles for this information.
Reader Comments
Anyone know of a clean way to change the version reported by windows to bypass installation requirements temporarily (I have a tool that I am pretty sure I can get to work on Win2K but it wont even install without XP).
It would save me a lot of time (otherwise I will have to decompile the installer, or hack the installer like was done for schtasks, neither of which I really want to have to take the time to do :)
Travis Johnson -October 08, 2002
The address for the 75=>EB (jne=>jmp) swap is CC50 in my version of schtasks.exe, but the same patch seems to work
bananas -May 20, 2004
It does not work!! There is no hex value 75, it is already EB...test these things before publishing them...I even tried changing the EB to 75 just in case the article was backwards...no luck
carlton -June 23, 2004
Works perfectly, excellent tip!
I guess the user complaining that it doesn't work has some odd version of the file - suggest he looks for a standard version.
ElMariachi -August 19, 2004
Let me update you guys with detail steps:
1. Use UltraEdit www.ultraedit.com and edit schtasks.exe
I have taken the schtasks.exe from XP and file version
is 5.1.2600.1106
2. Locate the line
0000CC50h: 75 0F 68 7F 15 00 00 E8 75 FD FF FF E9 AB 08 00
Now replace 75 with EB in column 1 and 9.
3. Save & exit
That's it, working perfectly
MPasha -August 30, 2004
I used hexedit http://www-physics.mps.ohio-state.edu/~prewett/hexedit to edit the file. My schtasks.exe is version 5.1.2600.2180 (file size 121,856). I could not find the entire string entered by MPashs, but I found 75 0F 68 7F 15 00 00 E8 at E3F8. I changed the 75 to EB and it seems to work. Haven't tried creating or deleting yet, just listing.
Anonymous User -December 06, 2004
I am using Winxp SP1. I modified the file in Code line CC50 and it works. Thanks a lot.
Anonymous User -December 07, 2004
Works perfectly, like a charm. :)
Anonymous User -January 14, 2005
Wonderful.
I used a simple bit of VB - no other software required.
Sub main()
Dim Dummy() As Byte
ReDim Dummy(0 To FileLen("c:\temp\schtasks.exe") - 1)
Open "c:\temp\schtasks.exe" For Binary As #1
Get #1, , Dummy
Close #1
Dummy(58360) = 235
Open "c:\temp\schtasks2k.exe" For Binary As #1
Put #1, , Dummy
Close #1
End Sub
Anonymous User -January 27, 2005
Tried the trick with both the WinXP SP1 and SP2 versions and it worked fine. Very useful tip, thanks.
Now, the next question is, how to modify the Win2003 version of Schtasks.exe so it´ll run on Win2000? The Win2003 Schtasks.exe has a bit more functions (for example I need to use the /DISABLE parameter).
I've found the following line
75 0F 68 7E 04 00 00 FF 15 DC 10 00 01 8B C3 EB
at address:
0x0000F52FH
in the Win2003 version (5.2.3790.0), but changing 75 to EB in that line won't work.
Can anyone figure out what to do?
pvillani -March 07, 2005
XP to Win2000 works great.
Win2003 (5.2.3790.0) to Win2000 can't figure out yet...
Any suggestions?
Anonymous User -March 22, 2005
The schtasks works great on w2k except that it prompts for a run password. the task though creates fails to run if the password is left blank.
I tried using the /s /u /p flags with local machine name, username and password it returns with an error message
"ERROR: Passing the user credential on local connection"
This defeats the purpose that i am trying to achieve but otherwise works great.
Anonymous User -March 24, 2005
works well, thx a lot!
Anonymous User -March 25, 2005
Any ideas on how to make the same thing work for the Win2003 SP1 version of schtasks?
Anonymous User -May 10, 2005
nice work with the VB code, worked a treat!
wonder why they don't want us to run it on 2K...
Anonymous User -May 12, 2005
Thx it works perfectly ;->
Anonymous User -June 27, 2005
Tried on schtasks v5.1.2600.2180, address was e3f7 and works well. thx!
Free CDs Offer Fundamental Content for IT Pros Are you up to speed on the latest technologies and solutions? Don't miss out on your chance to get up to speed quickly on fundamental, in-depth information on some of the hottest topics in our library of content.
Let Your Users Reset Their Own Passwords: Free Download Try a 30 day free trial of Desktop Authority Password Self-Service – it provides an easy-to-use, robust system for allowing users to reset their own forgotten passwords or locked accounts.
Get Windows IT Pro & Mark Minasi’s Favorite Power Tools Guide Order Windows IT Pro now and get "More of Mark Minasi's Favorite Power Tools"--a in-depth guide to the most useful Windows commands --FREE with your paid order! Subscribe today, and save 58% off the cover price!
Deep Dive into VMware vSphere, eLearning Series Join John Savill to explore the major functionality capabilities of the vSphere virtualization platform, including identification of the changes from ESX 3.5.