karpach / remote-shutdown-pc Goto Github PK
View Code? Open in Web Editor NEWRemote Shutdown Manager is a windows application, which gives an ability to shutdown, suspend, hibernate PC or turn screen off using HTTP GET request.
Remote Shutdown Manager is a windows application, which gives an ability to shutdown, suspend, hibernate PC or turn screen off using HTTP GET request.
Hello,
please, can you add "Lock screen". Command for this:
Rundll32.exe user32.dll,LockWorkStation
Also with something like this "http://remote-host-name:5001/secret/lock"
Thank you
Hi,
Firstly thank you for providing this software.
I'm having an issue running the application which fails with an incompatibility error. I've tried both the oldest release and the newest both of which fail with the same error. I'm running Windows 7 32bit I know that's not much to go on but any ideas what may be stopping it from running?
Kind regards
Mark
希望在命令行处能输入bat批处理文件名,手机遥控执行这个bat批处理文件。
想在休眠或关机前执行一下其他任务,我在bat中加入休眠或关机命令,
谢谢作者的小工具!
Is it possible to have a checkbox to force the shutdown/reboot, because if there are some open programs in the background the pc will not shutdown/reboot.
Great app, congratulations. Optimal operation, with simple Curl instruction. If you added run as a service and send wol, it would already be perfect. His combined uses with VirtualHere gives a lot of options in a simple way.
add security code can't control
What is the syntax to use the “Turn off screen” command please? * http://remote-host-name:5001/turnoffscreen? …/turn-off-screen? other?
Other question, do I have to open the 5001 port on my PC firewall? Because for now nothing works sadly
Is there anything to configure first in configuration.yaml to use curl commands? I have this error: Logger: homeassistant.components.command_line
Source: components/command_line/init.py:43
Integration: command_line (documentation, issues)
First occurred: 19:19:09 (2 occurrences)
Last logged: 19:20:24
Timeout for command: curl http://192.168.1.29:5001/test/turn-screen-off
Thanks for you help
First, this is a great piece of software, super important feature for places with frequent power issues. Perhaps this is the wrong place for this question, but if someone could point me towards compiling this for old machines (they exist as VMs only now), it would be great to be able to shut them down like more modern machines.
Regards,
Jordan
Hi,
Really impressed with this project it is exactly what I need. However, i have no idea how to get started. could you help, please?
Sam
My English is not very good, hope you can understand what I mean.
I hope there is a feature that I can determine the workstation is lock or unlock.
This URL will be look like:
http://remote-host-name:5001/secret/islock/
And it will return true or false string in respond message.
It will be helpful to let remote know the PC workstation state and doing some synchronous controls for different devices.
This is a great tool and I'm using it in conjunction with TAustin's Smartthings Edge driver with great success. Thank you!
Clients like TAustin's and end users like myself could benefit from having insight into power management on the system. As it stands, I'm only able to control the PC power state (and thus the associated devices in my scheme) when it is fully active (e.g., not suspended or pending user log in). The ability to learn about events and the current power management parameters would greatly increase the utility that's already here.
Here's a potential approach:
With these in place, clients like the PC controller can know what’s going on and a) have the ability to reflect that status to their clients in turn as well as b) issue more appropriate power events in more situations.
These changes would obviously increase the scope of your tool beyond the handling shutdown requests and basic monitoring into a more complete solution, yet still in the realm of supporting shutdown and power state monitoring.
Thanks again for this tool and for your consideration of these or even better possibilities.
Hello,
With version remote-shutdown-pc-v1.0.40 the server won't work anymore.
Could you check?
Bye
Stefano
Where are settings saved?
I compiled app via VS 2019 without errors but when I run it the server is not created, there is no port that app is listening on. What could be the problerm, and how to debug it?
Would be nice, if there was an option to turn the screen off remotely too.
Any chance you can start off how compile these into executables for windows? Can't find any exe or installer inside here.
I'd like this jewel of a program to shutdown a virtualbox WinXP hosted by 64-bit Linux server. Is there a 32 bit option or version?
I have windows 11
no matter what request I trigger is executing the default action (Sys tray command).
I'm using a secret.
Is it possible to run some bat file before shutdown (hibernate) for example?
Thank you.
My PC is automatically backed up each night with the client backup feature of Windows Server 2012 R2 Essentials.
If the PC is suspended via the Windows toolbar menu, it automatically resumes at the scheduled backup time and the backup job is executed.
If the PC is suspended via the remote-shutdown-pc tool, it doesn't resume and the backup job isn't executed.
Why is the suspend-behavior different, and is there a way to also have the PC resume for the backup when suspended via the tool?
don't know if i'm doing something wrong, but it gives an exception error when trying to run, maybe some missing dependency ? your other remote shudown app works fine..
I even tried putting the files in the path specified in the error log: C:\projects\remote-controller
error log below:
2020-04-30 09:03:08.5664|FATAL|Karpach.Remote.Commander.Program|Autofac.Core.DependencyResolutionException: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = ControllerApplicationContext (ReflectionActivator), Services = [Karpach.Remote.Commander.ControllerApplicationContext], Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = None, Ownership = OwnedByLifetimeScope ---> An exception was thrown while invoking the constructor 'Void .ctor(Factory, Factory, Karpach.Remote.Commander.Interfaces.ICommandsSettings, Factory)' on type 'ControllerApplicationContext'. ---> Cannot cast the underlying exported value of type 'Karpach.Remote.Commands.CommandsContainer (ContractName="Karpach.Remote.Commands.Interfaces.IRemoteCommandContainer")' to type 'Karpach.Remote.Commands.Interfaces.IRemoteCommandContainer'. (See inner exception for details.) (See inner exception for details.) ---> Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(Factory, Factory, Karpach.Remote.Commander.Interfaces.ICommandsSettings, Factory)' on type 'ControllerApplicationContext'. ---> Cannot cast the underlying exported value of type 'Karpach.Remote.Commands.CommandsContainer (ContractName="Karpach.Remote.Commands.Interfaces.IRemoteCommandContainer")' to type 'Karpach.Remote.Commands.Interfaces.IRemoteCommandContainer'. (See inner exception for details.) ---> System.ComponentModel.Composition.CompositionContractMismatchException: Cannot cast the underlying exported value of type 'Karpach.Remote.Commands.CommandsContainer (ContractName="Karpach.Remote.Commands.Interfaces.IRemoteCommandContainer")' to type 'Karpach.Remote.Commands.Interfaces.IRemoteCommandContainer'.
at System.ComponentModel.Composition.ExportServices.CastExportedValue[T](ICompositionElement element, Object exportedValue)
at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportedValuesCore[T](String contractName)
at Karpach.Remote.Commander.ControllerApplicationContext..ctor(Factory settingsFormFactory, Factory hostHelperFactory, ICommandsSettings commandsSettings, Factory commandManagerFactory) in C:\projects\remote-controller\Karpach.Remote.Commander\ControllerApplicationContext.cs:line 38
at lambda_method(Closure , Object[] )
at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()
--- End of inner exception stack trace ---
at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()
at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable1 parameters) at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable
1 parameters)
--- End of inner exception stack trace ---
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable1 parameters) at Autofac.Core.Resolving.InstanceLookup.Execute() at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable
1 parameters)
at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable1 parameters) at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable
1 parameters, Object& instance)
at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable1 parameters) at Autofac.ResolutionExtensions.Resolve[TService](IComponentContext context, IEnumerable
1 parameters)
at Karpach.Remote.Commander.Program.Main() in C:\projects\remote-controller\Karpach.Remote.Commander\Program.cs:line 32
2020-04-30 09:03:18.5675|FATAL|Karpach.Remote.Commander.Program|Autofac.Core.DependencyResolutionException: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = ControllerApplicationContext (ReflectionActivator), Services = [Karpach.Remote.Commander.ControllerApplicationContext], Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = None, Ownership = OwnedByLifetimeScope ---> An exception was thrown while invoking the constructor 'Void .ctor(Factory, Factory, Karpach.Remote.Commander.Interfaces.ICommandsSettings, Factory)' on type 'ControllerApplicationContext'. ---> Cannot cast the underlying exported value of type 'Karpach.Remote.Commands.CommandsContainer (ContractName="Karpach.Remote.Commands.Interfaces.IRemoteCommandContainer")' to type 'Karpach.Remote.Commands.Interfaces.IRemoteCommandContainer'. (See inner exception for details.) (See inner exception for details.) ---> Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(Factory, Factory, Karpach.Remote.Commander.Interfaces.ICommandsSettings, Factory)' on type 'ControllerApplicationContext'. ---> Cannot cast the underlying exported value of type 'Karpach.Remote.Commands.CommandsContainer (ContractName="Karpach.Remote.Commands.Interfaces.IRemoteCommandContainer")' to type 'Karpach.Remote.Commands.Interfaces.IRemoteCommandContainer'. (See inner exception for details.) ---> System.ComponentModel.Composition.CompositionContractMismatchException: Cannot cast the underlying exported value of type 'Karpach.Remote.Commands.CommandsContainer (ContractName="Karpach.Remote.Commands.Interfaces.IRemoteCommandContainer")' to type 'Karpach.Remote.Commands.Interfaces.IRemoteCommandContainer'.
at System.ComponentModel.Composition.ExportServices.CastExportedValue[T](ICompositionElement element, Object exportedValue)
at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportedValuesCore[T](String contractName)
at Karpach.Remote.Commander.ControllerApplicationContext..ctor(Factory settingsFormFactory, Factory hostHelperFactory, ICommandsSettings commandsSettings, Factory commandManagerFactory) in C:\projects\remote-controller\Karpach.Remote.Commander\ControllerApplicationContext.cs:line 38
at lambda_method(Closure , Object[] )
at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()
--- End of inner exception stack trace ---
at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()
at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable1 parameters) at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable
1 parameters)
--- End of inner exception stack trace ---
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable1 parameters) at Autofac.Core.Resolving.InstanceLookup.Execute() at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable
1 parameters)
at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable1 parameters) at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable
1 parameters, Object& instance)
at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable1 parameters) at Autofac.ResolutionExtensions.Resolve[TService](IComponentContext context, IEnumerable
1 parameters)
at Karpach.Remote.Commander.Program.Main() in C:\projects\remote-controller\Karpach.Remote.Commander\Program.cs:line 32
2020-04-30 09:13:38.4157|FATAL|Karpach.Remote.Commander.Program|Autofac.Core.DependencyResolutionException: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = ControllerApplicationContext (ReflectionActivator), Services = [Karpach.Remote.Commander.ControllerApplicationContext], Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = None, Ownership = OwnedByLifetimeScope ---> An exception was thrown while invoking the constructor 'Void .ctor(Factory, Factory, Karpach.Remote.Commander.Interfaces.ICommandsSettings, Factory)' on type 'ControllerApplicationContext'. ---> Cannot cast the underlying exported value of type 'Karpach.Remote.Commands.CommandsContainer (ContractName="Karpach.Remote.Commands.Interfaces.IRemoteCommandContainer")' to type 'Karpach.Remote.Commands.Interfaces.IRemoteCommandContainer'. (See inner exception for details.) (See inner exception for details.) ---> Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(Factory, Factory, Karpach.Remote.Commander.Interfaces.ICommandsSettings, Factory)' on type 'ControllerApplicationContext'. ---> Cannot cast the underlying exported value of type 'Karpach.Remote.Commands.CommandsContainer (ContractName="Karpach.Remote.Commands.Interfaces.IRemoteCommandContainer")' to type 'Karpach.Remote.Commands.Interfaces.IRemoteCommandContainer'. (See inner exception for details.) ---> System.ComponentModel.Composition.CompositionContractMismatchException: Cannot cast the underlying exported value of type 'Karpach.Remote.Commands.CommandsContainer (ContractName="Karpach.Remote.Commands.Interfaces.IRemoteCommandContainer")' to type 'Karpach.Remote.Commands.Interfaces.IRemoteCommandContainer'.
at System.ComponentModel.Composition.ExportServices.CastExportedValue[T](ICompositionElement element, Object exportedValue)
at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportedValuesCore[T](String contractName)
at Karpach.Remote.Commander.ControllerApplicationContext..ctor(Factory settingsFormFactory, Factory hostHelperFactory, ICommandsSettings commandsSettings, Factory commandManagerFactory) in C:\projects\remote-controller\Karpach.Remote.Commander\ControllerApplicationContext.cs:line 38
at lambda_method(Closure , Object[] )
at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()
--- End of inner exception stack trace ---
at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()
at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable1 parameters) at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable
1 parameters)
--- End of inner exception stack trace ---
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable1 parameters) at Autofac.Core.Resolving.InstanceLookup.Execute() at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable
1 parameters)
at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable1 parameters) at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable
1 parameters, Object& instance)
at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable1 parameters) at Autofac.ResolutionExtensions.Resolve[TService](IComponentContext context, IEnumerable
1 parameters)
at Karpach.Remote.Commander.Program.Main() in C:\projects\remote-controller\Karpach.Remote.Commander\Program.cs:line 32
Would it be possible to have an option that puts the PC in Sleep/Hybrid Sleep mode as an alternative to Hibernation?
I guess it's more of a feature request than an issue..
But I want to install this on my kids PC, but he is smart enough to just exit the app.. can we make it so a password needs to be entered to exit the app? Or simply hide the tray icon so he has no idea that it is running?
Hi, is there a way to shut down the pc when a user isn't logged in or when it's on the lock screen. I'm using it with alongside home assistant for power outage automations.
Having a secret is good, but can easily be snooped as its in plain-text. Adding a certificate would close that loop hole.
I can imagine if this was distributed as-is on a school network, and a student got the secret-code, many laughs would be had :)
As it is Windows, the certificate can be stored in the local machines certificate store, which can then be updated via other automated means outside of the remit of this app. However, in order for it to be automated, the certificate needs to be able to be picked at startup, or part of a registry entry with the thumbprint.
Thank you for this useful tool 💯
Trying to run the latest 1.1.2 exe I keep getting this error:
---------------------------
Karpach.RemoteShutdown.Controller.exe
---------------------------
To run this application, you must install missing frameworks for .NET.
Would you like to download it now?
Chosing yes doesn't help. There doesn't start any download.
It seems I have installed these versions:
PS C:\WINDOWS\system32> Get-STDotNetVersion
ComputerName : localhost
>=4.x : 4.8 or later
v4\Client : Installed
v4\Full : Installed
v3.5 : Installed
v3.0 : Installed
v2.0.50727 : Installed
v1.1.4322 : Not installed (no key)
I've downloaded the 1.1.1, too, but without success (same error).
What else do I need ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.