We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
目前的首要任务,不能开机启动感觉掉价不少
The text was updated successfully, but these errors were encountered:
在启动目录下创建快捷方式,启动目录如下:
C:\Users\<user name>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
可以用 windows-shortcuts
windows-shortcuts
具体代码大概是
var ws = require('windows-shortcuts'); ws.create(path.join( process.env.APPDATA, 'Microsoft/Windows/Start Menu/Programs/Startup/net.tsinghua.lnk'), process.execPath);
其中 process.execPath 是 exe 的位置
process.execPath
具体代码加到 main.js 的这个地方
main.js
function install(done) { var target = path.basename(process.execPath); console.log('Creating shortcut.'); executeSquirrelCommand(["--createShortcut", target], done); // 加到这里 }
这个函数会在程序安装或更新后被调用,要在这里重新建立快捷方式
Sorry, something went wrong.
b13a48b 中实现了 Windows 下的开机启动,最后还是直接用的 Update.exe
No branches or pull requests
目前的首要任务,不能开机启动感觉掉价不少
The text was updated successfully, but these errors were encountered: