How to run Windows Server 2003 version of SchTasks.exe on Windows 2000

I am not sure if it is the right place to post. Feel free to delete / move the post if needed.

As you know SchTasks.exe is a command line utility that manage jobs in Task Scheduler. However it is for XP, 2003 and above only. There are info on the net that shows how to hack *XP* version of SchTasks.exe to run on 2000. However, I want to hack *2003* version because it is more versatile. After extensive search I got nothing, so I had to do it myself.

My approach is as follow. I opened the executable with PE Explorer and got output from the disassembler. Since the executable was (obviously) doing a check on OS version, it must have called an API such as GetOSVersion(). The API turned out to be VerifyVersionInfo(). According to the MSDN, the 1st argument to this function is a pointer to a version structure. I looked at the disassembler output and located the address of the structure. I spotted a "1" and a "5" there, and my instinct told me that the "1" was the OS minor version and "5" was the OS major version. So I suspected this was why the executable did not work on Windows 2000.

So I changed the OS minor version to "0" with a hex editor, and fixed the PE checksum. Then, I copied the hacked binary to a Windows 2000 system and tested it. It seemed have no problems adding and deleting tasks so my problem appeared to have been solved.

------

If you need to run Windows 2003 version of schtasks.exe on Windows 2000, use this procedure

  1. Create a copy of SchTasks.exe, say Sch.exe.
  2. Open Sch.exe with a hex editor.
  3. Search for the pattern 05 00 00 00 01 00 00 00.
  4. Change the 01 to 00 (which becomes checking for Windows 2000 or above, rather than XP or above).
  5. Save and close the hacked binary.
  6. Fix the PE checksum using any available utilities. Google for pechksum, setcsum, etc.

 

Just for the record:

  • 5.0 means 2K
  • 5.1 means XP
  • 5.2 means Server 2003



BTW, my solution was tested with Windows Server 2003 SP2 version of SchTasks.exe on Windows 2000 Server SP4.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值