How to make Windows shutdown automatically after Adobe Lightroom finishes exporting photos

How to make Windows shutdown automatically after Adobe Lightroom finishes exporting photos

by Mihai Neacsu on 12 September 2018 · 7493 views

In this tutorial we'll cover a simple solution to have Adobe Lightroom finish an export, then shut down Windows automatically, right away or with a delay and, optionally, with a custom message.

If you ever had a large batch of photos to export with Adobe Lightroom and the whole export process was taking a long time, you might have wanted an option to leave the export unattended and have Windows automatically shut down after Lightroom finishes its task. This was the case for me on more than one occasion, so here's the solution I found to be working, since Lightroom does not come with this option built-in.

In Adobe Lightroom's export dialog window (Ctrl+Shift+E on Windows), right at the bottom, after customizing all export parameters according to your needs, you can see a Post-Processing section. In the After Export drop-down there, you can choose Open in Other Application. This is where we'll select an application that will make Windows shut down. A simple application to do that can be created as a batch (.bat) file with a few command lines in it, so let's start by creating this file first.

Part 1: Create a Windows Shut Down Batch file

Step 1. Right-click on Desktop and select New > Text Document.

Step 2. Rename it to Shutdown.bat. Pay extra attention to the extension. It has to be .bat, not .txt.

1 full How to make Windows shutdown automatically after Adobe Lightroom finishes exporting photos

If you can't see the extension of the file, open a File Explorer (Windows key + E), go to the View tab, click on Options, switch to the View tab in the new "Folder Options" window, and make sure the box next to "Hide extensions for known file types" is unchecked, than hit Apply and OK.

2 full How to make Windows shutdown automatically after Adobe Lightroom finishes exporting photos

Step 3. Right-click the file "Shutdown.bat" and select Edit or Open with > Notepad.

3 full How to make Windows shutdown automatically after Adobe Lightroom finishes exporting photos

Step 4. Enter the following line, then save the .bat file:

shutdown.exe -s -f

The "f" parameter is to force all applications to close, just in case one of them hangs and, with it, the whole Windows shutdown process.

Extra options here:

To add a delay to the shutdown process, you can enter shutdown.exe -s -f -t 60 , where "60" is the amount of seconds Windows will wait before shutting down.

To add a custom message on top of that, you can enter shutdown.exe -s -f -t 60 -c "Lighroom finished exporting all files. This PC will shutdown in less than 1 minute.". Of course, your message can vary.

4 full How to make Windows shutdown automatically after Adobe Lightroom finishes exporting photos

If, somehow, you are at the PC when it finishes the export and you wish the cancel the Windows shutdown procedure, once the shutdown.bat file (with a time delay) has been called, you can do that if you have an "Abort shutdown" shortcut, as explained in this tutorial, in the Bonus section.

"You can create a shortcut to abort any of the commands above that are using shutdown.exe, provided that you specify a time parameter /t big enough so you'll have time to hit the Abort shortcut. The abort shortcut is simply C:\Windows\System32\shutdown.exe /a".

Part 2: Use this Shutdown batch file when exporting in Lightroom

Step 1. In Lightroom, select all photos you wish to export and hit Ctrl+Shift+E on Windows. This will open the Lightroom Export window where you can fiddle with the options as you see fit.

Step 2. At the bottom of the export window, under Post-Processing, click the drop-down for After Export and choose Open in Other Application.

Step 3. On the row below, click the button Choose and browse for the Shutdown.bat file you created in the first part of the tutorial.

Step 4. Click the Export button and let Lightroom export all the files you selected. At the end of the export process, the Shutdown.bat file will take over and start shutting down Windows, according to the parameters you entered for it.

5 large How to make Windows shutdown automatically after Adobe Lightroom finishes exporting photos

That's it. I hope this guide will make your photo processing job a bit easier.

Comments (0)
Featured Articles