-1

I made a script that uploads all the files in a predefined folder to the cloud. Now what I want is I want this script to run everytime the user tries to shut down the PC (running on windows 7) . So is there any way to achieve this ? Thanks in advance.

Zaid Khan
  • 3
  • 2

1 Answers1

0

Open gpedit.msc (local Policies).

And then, enter: Windows settings -> Scripts -> Shutdown -> Properties -> Add

In this file, you can write: python <path_to_the_python_file>

Yuval Pruss
  • 8,716
  • 15
  • 42
  • 67