1

pardon my English, I'm trying to run a bat file on windows shutdown (windows 10 home). I tried everything from editing the registry and adding folders with specific names (shutdown, startup ..) as in the following links: https://stackoverflow.com/questions/12434863/executing-a-batch-script-on-windows-shutdown, but nothing works.

I know about gpedit application and found how to install it on windows home. I haven't tried to do that however I'm not sure if this can work. Is there a way to do everything without regedit? I mean modifying the registry, creating the right files and folders etc. I know how to back up the system registry before making any modification to it. I want to run a bat, cmd or ps script that just write the date/time values to a text file on shutdown, startup login and logoff, just for testing that's all.

3
  • “Is there a way to do everything without regedit?” - I think you mean the group policy editor, but most group policies, are not even applicable to Windows 10 Home.
    – Ramhound
    Commented Dec 21, 2022 at 20:50
  • See superuser.com/questions/1758761/… for the way user1991 runs a script on shutdown. Commented Dec 21, 2022 at 20:58
  • know about gpedit application ..... I'm not sure if this can work. .... It is almost certainly worth your while to upgrade to Windows Pro.
    – anon
    Commented Dec 21, 2022 at 21:59

1 Answer 1

0

You can enable the Group Policy Editor. This is detailed in the article
How to Enable Group Policy Editor (gpedit.msc) In Windows 10 Home Edition.

However, from all the solutions listed in the above article, I would advise using the free and open-source Policy Plus. This product is an improvement on GPEdit : Although the interface is pretty similar, it also has a search function for policies.

However, some group policies will still not work in Windows Home. You may instead use the Task Scheduler, although you will need to find the Event IDs for each of the required events, and some may again not work on Windows Home.

For example, to trigger a scheduled task for Logoff, schedule a task as follows:

Begin the task: On an event
Log: Security
Source: (blank)
Event ID: 4647
1
  • Thank you @harrymc, I will try Policy Plus, I appreciate your help :)
    – Abdulamir
    Commented Dec 23, 2022 at 18:36

Not the answer you're looking for? Browse other questions tagged .