logo
down
shadow

Shutdown or Restart Computer from WCF Service Not Working


Shutdown or Restart Computer from WCF Service Not Working

Content Index :

Shutdown or Restart Computer from WCF Service Not Working
Tag : wcf , By : user181945
Date : December 01 2020, 05:00 PM

seems to work fine Ok, trying everything and keep failed, and ended up on this guy who use bat file. And it works..!
It is so weird and still don't know why it works. For now...who cares :)...later when I have spare time I will try to figure it out.
        ....
        Dim strCmd As String = "SHUTDOWN -m {0} -f -t 0 -r"           
        File.WriteAllText(_pathCmd & "cmd_restart.bat", String.Format(strCmd, "127.0.0.1"))
        Return ExecuteCommand(_pathCmd & "cmd_restart.bat", "")

Comments
No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

Using JNA or similar to shutdown and restart computer in linux and mac


Tag : linux , By : mckasty
Date : March 29 2020, 07:55 AM
I wish this helpful for you If you could simply override system protections just by using Java, that would be a big security flaw! I'm surprised you can do this on Windows.
Anyway, it can only be done if you have administrative access to your machine to set the program in a certain group which has the rights to shutdown/restart. Otherwise, you can't just do that.

how to shutdown-restart-hibernate-stand by-log off computer using Process.Start()?


Tag : chash , By : Marianisho
Date : March 29 2020, 07:55 AM
Hope that helps Im making a client-server application so i need to shutdown the remote pc Silently .. i've read about shutdown arguments in Commands Prompt shutdown/? .. but i still don't know the right arguments to do the commands below. shutdown restart hibernate stand by log off lock (switch user) , Try this:

How to make a python script which can logoff, shutdown, and restart a computer?


Tag : python , By : Andrew Bailey
Date : March 29 2020, 07:55 AM
will help you Background , To restart:
shutdown /r
shutdown /l
def shutdown(self):
    import subprocess
    subprocess.call(["shutdown", "-f", "-s", "-t", "60"])
def shutdown(self):
    import subprocess
    subprocess.call(["shutdown", "-f", "-r", "-t", "60"])

How to restart or shutdown a remote computer with comment from powershell


Tag : powershell , By : user179271
Date : March 29 2020, 07:55 AM
I hope this helps you . On a related research, I stumbled upon the WMI Class Win32_OperatingSystem which comes with a method Win32ShutdownTracker.
The documentation for the Win32Shutdowntracker() method is available here: https://msdn.microsoft.com/en-us/library/aa394057(v=vs.85).aspx
(Get-WmiObject -Class Win32_OperatingSystem -ComputerName $Computer).Win32Shutdowntracker(0, "This is a custom comment", 0x00000000, 6)
(Get-WmiObject -Class Win32_OperatingSystem -ComputerName $Computer -Credential $CustomCredentials).Win32Shutdowntracker(0, "This is a custom comment", 0x00000000, 6)

GAE shutdown or restart all the active instances of a service/app


Tag : google-app-engine , By : DicksGarage
Date : March 29 2020, 07:55 AM
Related Posts Related QUESTIONS :
  • Windows 8.1 wcf communciation common algorithm exception
  • Changing protocol from net.tcp to http, Wcf, gives me the error "No corresponding start element is open"
  • Resolving WCF endpoint address dynamically with autofac
  • WCF cannot implement interface - no matching return type
  • BizTalk WCF SendPort CDATA in response
  • Duplex connection with SOAP 1.1 service
  • consume external WCF in netcore 2.0
  • WCF Request Entity Too Large
  • Entlib Custom exception handler missing mappings
  • BizTalk REST call works only when Fiddler running
  • this Operation is not supported in WCF Test Client Error
  • Exposing Unused Enum from a WCF service
  • Access WCF service through internet?
  • Multiple WCF services referencing the same data contracts
  • Add Service Reference is generating Message Contracts
  • System.ServiceModel.CommunicationException - On Large Message Size
  • What can be done to speed up synchronous WCF calls?
  • How to add service known types from external config file
  • WCF Service hangs on the 14th call
  • C#- Using IClientChannel interface without implementing all methods, and/or without casting in a messy manner
  • Not Implemented at System.Data.Services.AstoriaRequestMessage.get_HttpVerb()
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com