openclaw电脑开机自动启动脚本程序编写

openclaw编写电脑开机自动启动脚本程序:

(1)创建记事本,复制粘贴以下自动启动小龙虾openclaw小程序:

# OpenClaw Gateway auto-start script
# Created by 小龙虾

Write-Host "Starting OpenClaw Gateway..." -ForegroundColor Cyan
Start-Sleep -Seconds 3

$userProfile = $env:USERPROFILE
if (-not $userProfile) {
$userProfile = "C:\Users\$env:USERNAME"
}

$openclawPath = Join-Path $userProfile "AppData\Roaming\npm\openclaw.ps1"

if (Test-Path $openclawPath) {
Write-Host "Found OpenClaw, starting gateway..." -ForegroundColor Green
& $openclawPath gateway
} else {
Write-Host "OpenClaw not found at $openclawPath" -ForegroundColor Red
Write-Host "Trying openclaw command..." -ForegroundColor Yellow
openclaw gateway
}

(2)保存之后再记事本左上方点击:文件——另存为:修改记事本程序脚本文件的文件名为:openclaw小龙虾启动程序.ps1,文件类型里面选择所有文件类型(一定不要选择文本文件类型)即可

 

image

 

image

 (3)桌面上会出现一个openclaw小龙虾启动程序的poweshell运行脚本文件,然后右击选择:使用poweshell运行即可,等待一下启动成功,打开飞书即可聊天了 :

 

image

 

image

 

 

image

 

image

 

posted @ 2026-03-16 00:39  The-Chosen-One  阅读(4)  评论(0)    收藏  举报