谷歌浏览器多开
某些情况下,比如有一个网站多个账户,需要多开进行操作,那么可以通过下面脚本进行操作。该脚本基于windos10-11环境
环境依赖
1.windows10或windows11系统
2.需要提前安装好谷歌浏览器
基于谷歌浏览器多用户模式创建多开快捷方式
操作
创建文件 谷歌多开.vbs 文件,内容如下
' 随机字符串生成器,用户随机用户生成
Function GetRandStr(length)Dim desstr, tempstr, i, strlentempstr = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"Randomize Time()strlen= Len(tempstr)For i = 1 To lengthdesstr = desstr & Mid(tempstr , Int(Rnd *strlen + 1) ,1)NextGetRandStr= desstr
End Function' 判断google浏览器exe是否存在
Function IsExitAFile(filespec)Dim fsoSet fso=CreateObject("Scripting.FileSystemObject") If fso.fileExists(filespec) Then IsExitAFile=True Else IsExitAFile=False End If
End Function ' 谷歌浏览器多用户批量创建
Function createGShort(g_path)username = GetRandStr(8)set WshShell = WScript.CreateObject("WScript.Shell")strDesktop = WshShell.SpecialFolders("Desktop") '获得桌面目录set oShellLink = WshShell.CreateShortcut(strDesktop & "\谷歌浏览器多开用户" & username & ".lnk") '快捷方式存放目录及名称oShellLink.TargetPath = g_path & "\chrome.exe" '指向的可执行文件oShellLink.Arguments="--user-data-dir=C:\Google1Data\" & username & "\"oShellLink.WindowStyle = 1 '运行方式(窗体打开的方式)'oShellLink.Hotkey = "CTRL+SHIFT+F" '快捷键'oShellLink.IconLocation = "D:\GbServer\img\log.ico, 0" '图标(同样可不指定)oShellLink.Description = "谷歌浏览器用户" & username '备注信息oShellLink.WorkingDirectory = g_path '起始目录oShellLink.Save '保存快捷方式End FunctionDim GPLIST(1),gpath, gexe
GPLIST(0) = "C:\Program Files (x86)\Google\Chrome\Application"
GPLIST(1) = "C:\Program Files\Google\Chrome\Application"
gexe=1
For i=0 To ubound(GPLIST)gpath = GPLIST(i)If IsExitAFile(gpath & "\chrome.exe") ThenDim name_numgexe=2name_num=Inputbox("请输入谷歌浏览器多开用户数量")Dim Count:Count = 0 '定义一个变量,并赋值为0For j = 1 To name_num '循环10次Count = Count + 1createGShort(gpath)NextIf name_num <> false thenMsgBox "已经创建好多开快捷方式,请分开登录" '输出10End IfEnd If
Next
if gexe=1 thenMsgBox "没有发现google二进制程序,请重新安装谷歌浏览器到默认路径"
end if
双击运行,输入多开的数量,然后点击确定
桌面会多出五个浏览器快捷方式

这些数据存储在 C:\Google1Data 目录下,如果有需要的话,可以在该目录查看用户数据
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
