读取INI更改IE首页[已解决]
本帖最后由 woeiwoei 于 2010-3-23 14:42 编辑$var = IniReadSection(@ScriptDir & "\lp.ini", "section")
If @error=0 Then
MsgBox(4096, "", "INI文件不存在!")
Else
RegWrite("HKCR\CLSID\{871C5380-42A0-1069-A2EA-08002B30309D}\shell\OpenHomePage\Command","", "REG_SZ", '"C:\Program Files\Internet Explorer\iexplore.exe" '&"$var")
EndIf
我这样写后打开IE 地址栏显示的是http://$var。没读取到数值~~怎么回事啊? 没人知道吗?帮帮我啊! RegWrite("HKCR\CLSID\{871C5380-42A0-1069-A2EA-08002B30309D}\shell\OpenHomePage\Command","", "REG_SZ", '"C:\Program Files\Internet Explorer\iexplore.exe" '&"$var")
改为
RegWrite("HKCR\CLSID\{871C5380-42A0-1069-A2EA-08002B30309D}\shell\OpenHomePage\Command","", "REG_SZ", '"C:\Program Files\Internet Explorer\iexplore.exe" '&$var) 回复 3# lynfr8
谢谢帮忙!! $var =IniRead("config.ini", "config", "URL","NotFound")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main","Start Page", "REG_SZ","")
这个$var如何加到键值后呢?也就是说读取ini中的URL= 让他应用到 "Start Page", "REG_SZ","这里?"
我尝试了"REG_SZ","$var" au3是不报错了,但是 注册表中显示的是 $var!汗了。。其他的格式au3报错。
能再请教一下吗?在线等。急!!
谢谢3楼的大哥,RegWrite("HKCR\CLSID\{871C5380-42A0-1069-A2EA-08002B30309D}\shell\OpenHomePage\Command","", "REG_SZ", '"C:\Program Files\Internet Explorer\iexplore.exe"'&$var)这个确实没问题!! $var =IniRead("config.ini", "config", "URL","NotFound")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main","Start Page", "REG_SZ",$var)
直接饮用变量! 回复 6# kxing
汗了。我咋就没直接运用变量呢?
谢谢你。。。 都是人才啊~~修改主页的东西,值得商酌啊~~ IE首页修改
页:
[1]