提前致谢.
似乎没有目前批准的方法来做到这一点.
但该论坛中的一位用户发布了这样的信息
如果从vista / 2008服务器上运行schtasks,可以将xp / 2003 schtasks导出到xml. schtasks / query / s xpmachine / tn taskname / XML> taskname.xml然后你可以导入它.不完美但可以节省时间.我使用/ fo table打开任务导出excel删除不需要的列并创建批处理文件以转储xmls然后/ create / xml xmlfile.xml将xmls导入新服务器.希望这可以帮助.
所以它似乎有可能,但它需要一些jiggery pokery.
我自己试了一下,但继续从Win2008获取访问被拒绝的错误.即使我是具有所有权限的网络管理员.也许别人可以尝试一下?
编辑 – 解决方案:
Where you got your job files was probably c:\windows\tasks,however under Vista there is a new place the xml files exist. (Under c:\windows\system32\tasks)
Try looking there on your old machine if possible.HOWEVER,there is a way if you can’t get to the original machine easily.
- You will need 2 files off an XP machine (Schtasks.exe and Schedsvc.dll) they are both in the Windows\System32 folder,copy them to USB and thats all you need from XP.
- Now on your Vista machine.
Put them in their own directory on your vista machine (lets say you make a directory called c:\sch and put those 2 files in there)
DO NOT overwrite the vista ones in c:\windows\system32.- Rename your job files Test1.job,Test2.job,Test3.job,Test4.job and copy them into c:\windows\tasks
- Open up a command prompt (Start Programs,Accessories,right click on Command Prompt and select run as administrator)
- Now to touch over the new .job files to get vistas scheduler to take on the parameters.
- In your command prompt
type in cd c:\sch then enter (for our example)- Now for each job type in
schtasks /change /TN “Test1” /RU Terry /RP Terry
(Changing the Test1 to Test2,Test3,Test4 for our example)
The /RP and /RU values will have to change,thats a username and password (RP being password,RU Being User)- You should receive the message
SUCCESS: The parameters of scheduled task “Test1” have been changed.
for each job.When done close your command prompt.
From there Windows scheduler now knows about these,and you can use the windows Gui to update their names,and who they run as.
我亲自试过这个,是的确有效.编写脚本只需要花费一点力气.您只需将xp文件保留在vista机器上即可.然后,您也可以通过脚本将它们导出为XML.