Executing a batch script on Windows shutdown

前端 未结 6 627
旧巷少年郎
旧巷少年郎 2020-12-08 06:55

Is there any way, in Windows 7 Professional, to run a batch script (e.g., a .BAT file) when the user clicks on \"shutdown\" (not a batch file scheduled to shut

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-08 07:47

    You can create a local computer policy on Windows. See the TechNet at http://technet.microsoft.com/en-us/magazine/dd630947

    1. Run gpedit.msc to open the Group Policy Editor,
    2. Navigate to Computer Configuration | Windows Settings | Scripts (Startup/Shutdown).

    enter image description here

提交回复
热议问题