标题: 这个代码怎么改,需要运行CMD才可以运行的。(已解决)
[打印本页]
作者: cheng54550
时间: 2007-6-13 11:45
标题: 这个代码怎么改,需要运行CMD才可以运行的。(已解决)
需要运行CMD才可以运行的
for %1 in (%windir%\system32\*.dll) do regsvr32.exe /s %1
Last edited by cheng54550 on 2007-6-13 at 04:18 PM ]
作者: lxmxn
时间: 2007-6-13 11:58
for %%a in (%windir%\system32\*.dll) do regsvr32.exe /s %%a
在批处理中,for 中的变量用%%a、%%b等来表示。
作者: cheng54550
时间: 2007-6-13 12:04
嘻嘻,斑斑说的我不懂,我只有慢慢学。
我只是想省的事,直接运行bat就可以运行了,不想运行cmd在复制上这个代码在确定。
表骂我啊...555
作者: lxmxn
时间: 2007-6-13 15:12
你把2楼的代码保存为一个后缀为.bat的文件,运行就可以了。
作者: cheng54550
时间: 2007-6-13 16:18
辛苦斑斑了...呵呵高兴挖
作者: alex0007
时间: 2007-6-14 05:30
d:\hacker\ipc>for %%a in (%windir%\system32\*.dll) do regsvr32.exe /s %%a
此时不应有 %%a。
d:\hacker\ipc>for %%a in (%windir%\system32\*.dll) do echo %%a
此时不应有 %%a。
何解???
作者: prodigall
时间: 2007-6-14 10:14
在你现在运行的环境下只需输入以下即可:
for %a in (%windir%\system32\*.dll) do regsvr32.exe /s %a
但你想要建立一个BAT文件再调用,就需用:
for %%a in (%windir%\system32\*.dll) do regsvr32.exe /s %%a
比如说建一个BAT文件,a.bat
里面的内容需是
for %%a in (%windir%\system32\*.dll) do regsvr32.exe /s %%a
你才能运行a.bat