2,462
社区成员
发帖
与我相关
我的任务
分享
Sub test10()
'第一个网站,用户数据保存在 D:\360user\user1 中
Mypath1 = """C:\Documents and Settings\Administrator\Application Data\360se6\Application\360se.exe"""
MyPath2 = " " & "--user-data-dir="
Mypath3 = """D:\360User\user1"""
Mypath = Mypath1 & MyPath2 & Mypath3
'在注册表中,设置"C:\Documents and Settings\Administrator\Application 'Data\360se6\Application\360se.exe" --user-data-dir="D:\360User\user1"
Set WshShell = CreateObject("WScript.Shell")
WshShell.RegWrite "HKCR\CLSID\{0002DF01-0000-0000-C000-000000000046}\LocalServer32\", "" & Mypath & "", "REG_SZ"
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = 1
ie.navigate "http://www.163.com"
Sleep 10000
'第二个网站,我希望用户数据保存在 D:\360user\user2 中,但不行???
'在注册表中,设置"C:\Documents and Settings\Administrator\Application 'Data\360se6\Application\360se.exe" --user-data-dir="D:\360User\user2"
Mypath3 = """D:\360User\user2"""
Mypath = Mypath1 & MyPath2 & Mypath3
WshShell.RegWrite "HKCR\CLSID\{0002DF01-0000-0000-C000-000000000046}\LocalServer32\", "" & Mypath & "", "REG_SZ"
Set ie2 = CreateObject("InternetExplorer.Application")
ie2.Visible = 1
ie2.navigate "http://www.sina.com.cn"
Do While ie.busy Or ie.readystate <> 4
Loop
Sleep 10000
End Sub