Comments (2)
install script for start + run service (powershell)
on 64bit amd windows 11, put this into a bat file, have nssm and sol in the same folder
call nssm.exe install SleepOnLan sol.exe
call powershell -Command "& {Start-Service 'SleepOnLan';}"
protip: execute the sol.exe once manually to add firewall
i just want to add this here cause it will help some users but
to be honest it is not a reply to Arnasnn's Question, but his question is unreleated anyway. please delete.
from sleep-on-lan.
I have similar thing:
"Commands" : [{
"Operation" : "sleep",
"Command" : "c:\\bin\\psshutdown.exe -d -t 3 -v 0",
"Default" : true
}, {
"Operation" : "killgames",
"Command" : "cmd.exe /c d:\\home\\Serge\\bin\\vanya-killgames-do.cmd",
"Default" : false
}]
Sleep works OK, but games killer doesn't. CURL output:
<?xml version="1.0" encoding="UTF-8"?>
<result>
<operation>killgames</operation>
<successful>true</successful>
</result>%
and the log:
2022-07-03 14:09:30 INFO listener_http.go:221 Executing [killgames]
2022-07-03 14:09:30 INFO sleeper_windows.go:35 Executing operation [killgames], type[external], command [cmd.exe /c d:\home\Serge\bin\vanya-killgames-do.cmd]
2022-07-03 14:09:30 INFO sleeper_windows.go:46 Sleep implementation [windows], sleep command is [%!(EXTRA string=cmd.exe /c d:\home\Serge\bin\vanya-killgames-do.cmd, string=])
2022-07-03 14:09:30 ERROR sleeper_windows.go:49 Can't execute command [cmd.exe /c d:\home\Serge\bin\vanya-killgames-do.cmd] : exit status 1
Doesn't matter if I fun simply my cmd file as a command or via cmd.exe /c...
Looks like it works if full path is specified (C:Windows\System32\cmd.exe):
⇨ http server started on [::]:8009
2022-07-03 14:20:19 INFO listener_http.go:221 Executing [killgames]
2022-07-03 14:20:19 INFO sleeper_windows.go:35 Executing operation [killgames], type[external], command [C:\Windows\System32\cmd.exe /c d:\home\Serge\bin\vanya-killgames.cmd]
2022-07-03 14:20:19 INFO sleeper_windows.go:46 Sleep implementation [windows], sleep command is [%!(EXTRA string=C:\Windows\System32\cmd.exe /c d:\home\Serge\bin\vanya-killgames.cmd, string=])
2022-07-03 14:20:20 INFO sleeper_windows.go:51 Command correctly executed
(and I added full path to taskkill inside my cmd script as well).
from sleep-on-lan.
Related Issues (20)
- Switch logging framework to logrus
- Add missing target platform
- add commands doesn't work HOT 12
- Only allow expected command types in custom commands definition
- Log file or event log on Windows? HOT 2
- Incorrect example for Commands? HOT 3
- Have better "default configuration" generated
- Split the ZIP distribution into one archive per platform
- Split README.md into separated pages
- New --verbose parameter
- Extra default filenames
- Logs where not displaying timestamps in line with system's timezone
- No response for HTTP sleep HOT 2
- Have extra delay before executing command HOT 3
- PC sleeps immediately after Wake on Lan after having used sleep on lan HOT 5
- Wake on LAN works strange when service work HOT 1
- Create non-console version, so conhost.exe doesn't also need to run HOT 3
- VirusTotal scan results HOT 1
- Build binaries for x86 architecture HOT 1
- Commands cannot execute. I think the Execute function in SR-G/sleep-on-lan/src/utils_system.go is bugged.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sleep-on-lan.