Skip to content

Commit 36939cf

Browse files
committed
增加hostsshare.bat
1 parent 222e8af commit 36939cf

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
@echo off
2+
3+
rem 请这里配置f2etest的域名
4+
set f2etestDomain=f2etest.xxx.com
5+
set appid=hostsshare
6+
7+
rem 命令行参数
8+
set proxymode="%1"
9+
set proxyurl=%2
10+
set url=%3
11+
set apiKey=%4
12+
13+
rem 探测桌面模式
14+
set isWeb=1
15+
if %url% equ desktop (
16+
set url="about:blank"
17+
set isWeb=0
18+
)
19+
20+
rem 禁用代理
21+
set proxy="HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
22+
reg add %proxy% /v "ProxyEnable" /t REG_DWORD /d 0 /f>nul
23+
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /f /v AutoConfigURL
24+
25+
rem 打开应用
26+
start "" "c:\hostsShare\hostsShare.exe" "http://%f2etestDomain%/" "%USERNAME%" %apiKey%
27+
28+
rem 打点统计
29+
start "" curl "http://%f2etestDomain%/applog?userid=%USERNAME%&appid=%appid%&isweb=%isWeb%"

0 commit comments

Comments
 (0)