|
本帖最后由 qq4045728 于 2009-7-19 09:24 编辑
$i = IniReadSection(@WindowsDir&"\d.ini","reg")
Const $n=$i
For $i =1 to $n Step 1
$reg = IniRead(@WindowsDir&\"d.ini","reg",$i,"")
RunWait($reg)
Next
----------------------------------------------------------
[reg]
1=a.exe
2=b.exe
3=c.exe
为什么只将 a.exe循环运行了3次其他的确不运行??代码哪里有问题了.如果定义$i=3 确可以将1=a.exe,2=b.exe,3=c.exe都运行
---------------------------------------------------------
$q = IniReadSection(@WindowsDir&"\&"\d.ini","one")
const $w=$q
for $e = 1 to $w Step 1
$run= IniRead(@WindowsDir&"\d.ini","one",$e,"")
RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce",$e,"REG_SZ",$run)
Next
-------------------------------------
[one]
1=a.exe
2=b.exe
3=c.exe
这里确只将a.exe 写入到注册表了. 如果定义$q=3 确可以将1=a.exe,2=b.exe,3=c.exe都写到注册表
-------------------------------------
以上的问题好奇怪...
晕了换了iniread命令还是不行.. |
|