Code Monkey home page Code Monkey logo

onshutdown's Issues

Bug: This service does not work on Windows Server 2016 & 2019

Hi @gfody

We search exactly something like your service "OnShutdown", but unfortunately we are not able that your service works on Windows Server 2016 & 2019 VMs (Hyper-V).

I registered the Windows service like:
New-Service OnShutDown -bin 'OnShutdown 4000 "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command {Get-process | out-file c:\temp\testfile.txt}"' -StartupType Automatic

Do you have any idea why this is not working?

Writing registry changes on shut down

I am on Windows 11 Home, and I am looking for a way to perform some registry changes (stored in a *.reg file) whenever I shut down the laptop. Even with the info I found online - also in your instructions, and in the two existing issue threads - I just couldn't manage to make it work.

Maybe this would also be helpful to others. Could you run me through the necessary steps? Thanks! : )

Troubleshooting Service bin

Here's what I tried:

New-Service OnShutdown -bin 'OnShutdown 1 "cd \"C:\Program Files (x86)\Pulse-Eight\USB-CEC Adapter\" && tv_off.cmd"' -start Automatic

This doesn't seem to work on shutdown. Confirmed that service is started.

The README says The second parameter is the command to pass through to CreateProcess so I assume there's something wrong with my string. Running the string by itself unescaped works properly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.