在我以前的测试中(xp sp1),单纯地添加一个ini文件是不能实现开机运行的目的的,一般对于这种自启动方式,直接修改注册表效果会好得多。
Windows Registry Editor Version 5.00
"Script"="C:\\Documents and Settings\\Administrator\\桌面\\myscript.bat"
"Parameters"=""
在这里添加了启动以后,不光用msconfig无法查看,就连wmic的startup也找不到它的踪迹,我以前的方法是用Gpresult /v | findstr "名称" |findstr /v "站点" | findstr /v "域"(当时测试环境为sp1,用两各个findstr的方法也蛮可笑的。)。其实只要检测注册表的scripts下有无Startup或shutdown就可以知道有无开机自启动或关机时运行的脚本了。
In my previous tests (xp sp1), simply adding an ini file cannot achieve the purpose of starting up at boot. Generally, modifying the registry directly works much better for this kind of self-startup method.
Windows Registry Editor Version 5.00
"Script"="C:\\Documents and Settings\\Administrator\\Desktop\\myscript.bat"
"Parameters"=""
After adding the startup here, not only can't it be viewed with msconfig, but even wmic startup can't find its trace. My previous method was using Gpresult /v | findstr "Name" |findstr /v "Site" | findstr /v "Domain" (the test environment was sp1 at that time, and the method of using two findstrs was quite funny). In fact, as long as you check whether there are Startup or shutdown under scripts in the registry, you can know whether there are scripts that start up at boot or run at shutdown.