重新启动计算机后恢复批处理脚本 [英] Resume batch script after computer restart

查看:186
本文介绍了重新启动计算机后恢复批处理脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一堆运行Windows 2000 Pro和IE 5.0的旧机器,我想用Silverlight升级到IE 6.我从微软的网站上下载了IE6和Silverlight安装程序,幸运的是,它们都具有命令行选项,可以在静默模式"下运行.

I have a bunch of old machines running Windows 2000 Pro and IE 5.0 which I want to upgrade to IE 6 with Silverlight. I downloaded the IE6 and Silverlight installers from Microsoft's web sites and fortunately they both have command line options to allow them to run in "silent mode".

我将这两个命令放在DOS批处理脚本中并运行,但是IE6安装程序要求计算机自动重启,因此问题是如何恢复脚本并运行第二个命令(安装Silverlight).

I put the two commands in a DOS batch script and ran it, but the IE6 installer requires makes an automatic computer restart so the question is how to resume the script and run the 2nd command (install Silverlight).

我的批处理文件现在非常简单:

My batch file is very simple right now:

ie6setup.exe /Q
silverlight.exe /q

据我了解,重新启动计算机后,批处理文件将无法恢复执行.有没有办法让他们做到这一点?当然还有另一种方法可以满足我的需求.

From what I know, batch files can't resume execution after restarting the computer. Is there a way to make them do that? of is there another way to accomplish what I need.

谢谢

推荐答案

您可以将第二个命令放入独占的批处理文件中,并在regedit中添加一个条目,以在Windows启动时自动执行此批处理文件,从而使重新启动计算机后,将执行Silverlight .

You could put the second command in a exclusive batch file, and add an entry to regedit to execute this batch file automatically upon Windows' start, making silverlight be executed after the computer restarts.

您听说过 msconfig 吗?在某些系统上,您要查找的regedit路径为:

Have you heard of msconfig? On some systems the regedit PATH you are looking for is:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

但是您可能要检查一下.如果要制作批处理文件以在注册表上写入该密钥,则可能应该查看

But you may want to check that. If you want to make a batch file to write that key on the registry, you probably should take a look at this tutorial.

这篇关于重新启动计算机后恢复批处理脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆