Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

一键登录 #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

一键登录 #4

wants to merge 1 commit into from

Conversation

Matthew43
Copy link

每次登陆校园网操作多步很麻烦,于是写了个bat文件,window用户可以放在桌面上,每次一键登陆。

----from JLU

每次登陆校园网操作多步很麻烦,写了个bat文件,window用户可以放在桌面上,每次一键登陆。
chcp 936

:: path for python27
set py=C:\Python27\python.exe
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不要用绝对路径,请想办法获取到PATH中python的安装路径,或者提供交互式的界面设置python的路径。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ly0 只是一个简单实现~~有时间,可以慢慢包装~

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

加油
image

:: path for python27
set py=C:\Python27\python.exe
:: path for newclient.py
set login=C:\Python27\newclient.py
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果要做成one-click式的脚本,请提供以下的功能

  1. 自动下载最新的 newclient.py
  2. 有交互式界面来配置脚本
  3. 脚本和 newclient.py 需要是一个文件。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

做个docktray嘛

@zpole
Copy link

zpole commented Nov 9, 2016

我也写了个bat,但不知道为什么就是不能挂在后台,python和pythonw都不行(用以前的客户端都可以挂在后台没有cmd)。。。然后就干脆把用计划任务开机自启了。奇怪的是如果在参数里设定newclient的位置,比如F://newclient.py就会启动失败,但参数只写newclient.py然后初始位置设置成F://就可以,也是醉了。。。顺带,我mac上现在使用shell脚本开机自启来实现开机登陆(需要将进程fork成子进程才能在后台),然后我尝试plist(mac自己的开机启动方式)也失败了。。。

@windmzx
Copy link

windmzx commented Nov 23, 2016

为什么不试试 拿pyinstaller 封装成exe呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants