NASA Image of the Day As Your Desktop!





Introduction: NASA Image of the Day As Your Desktop!

About: I am a student in high school who likes to make robots and program things in my free time. I usually design parts in Fusion 360 to go with the electronics, and usually develop on the AVR platform (mostly Ard...

Hello everyone! Welcome to my first instructable. In this instructable I will show you how to make a program that changes your computer’s desktop to the most recent NASA Image of the Day. These images are always stunning and the program really adds to your desktop appearance.

The NASA Image of the Day is a wonderful source of images from Earth, inside NASA, and distant galaxies. The images are always full of color, and I have yet to see one that does not go perfectly on a 1080p or less display.

This instructable contains directions for Windows 10 and the files included should mostly be usable for other similar operating systems, but it does require Java.

All files are available, open-source, on my GitHub.

I hope you enjoy and learn a lot from my first instructable. If you have any advice for me, I’d love to hear it!

Step 1: Set Up the Startup Files

Begin by opening your startup folder. Items in this folder will automatically run when you log in. If you won't be turning off your computer often, then you can skip this step and see how to manually schedule the program to run later on in Step 5.

To enter the startup folder, open the run dialog by tying [Windows Key] + R. In the run window that opens, type “shell:startup” without quotes (first image above) then hit enter.

Now you can download and move the attached file “DesktopChanger.bat” into startup. This file is programmed to run a .jar file from a folder on your desktop, so once you’ve moved it there, you should right-click the file and click on “Edit” in the menu.

You should now see a Notepad window open with some lines of code. You will need to change the line:


(WITH quotes) to include the location of your photo, instead of the placeholder. For example, if you placed the image on a folder in your C drive, you would instead type:


(WITH quotes.) If the item is located on a separate drive, include /d at the end of your quoted location, for example:


(WITH quotes.) You should use an empty folder that already exists, but without any images.

Step 2: Setting Up the Java Jar File

Now we’ll work on the folder you used earlier. If you have not already, then create the folder.

In this folder, you’ll want to include the attached file “Refresh Image.jar,” which is the main code that drives this program. You can find the source code on my github page. Make sure that the [FOLDER LOCATION] specified in the previous step is the exact folder location of the file. You can get the exact location of the file by right-clicking it in Windows Explorer and selecting "Properties," then copying the text listed beside "Location" (as in the images above.)

Now try running the Java file by double-clicking it. If you have Java properly installed, it should run without errors, and two new files named “img.jpg” and “img2.jpg” should pop up. Running it again should keep both files.

Step 3: Change Settings

Now that the files are set up, the only thing left to do is apply the settings. Go to your desktop, right-click, and select “Personalize.” This should open your settings. On Windows 8-10 this will open the Settings window (imaged above,) but on Windows 7 it should open the Control Panel.

Within the settings, you need to change a few options:

  • Under the “Background” option, set the drop-down box to “Slideshow.”
  • Under the “Choose a Fit” menu, I selected Span, since I find that is looks the best (it will resize the image so that it is cut off at the sides, so the photo will be cut down, but there won’t be any black bars or stretching of the image.
  • And you’ll need to select the folder you created which contains “Refresh Image.jar” using the “Browse” button under the “Choose albums for your slideshow” section.

Note: In Windows 7 it seems you will need to select a set of photos; you can simply select the two images "img.jpg" and "img2.jpg" after running the "Refresh Image v1.2.jar" file.

Step 4: Registry Settings

NOTE: The Windows registry is where settings, software information, and other data is saved, and it is a very important part of your computer. Using the registry improperly can ruin your computer and render it unusable. But, if you follow these directions carefully enough, you will likely not have any issues at all.

If you aren’t comfortable with modifying registry values, then you can change the setting under “Change picture every” to 1 Minute. This will work too, but it will be much slower to change your desktop to the new photo when you start up your PC.

Open the registry by pressing [Windows Key] + R to open the run dialog, then type “regedit” (without quotes) and press enter. You will need to allow regedit to make changes to your computer (press “Yes” if you are prompted.) You now should see a window that, in the top left, looks like the first image included in this step. Navigate to HKEY_CURRENT_USER > Control Panel > Personalization > Desktop Slideshow, then double click the REG_DWORD labeled “Interval” (without quotes) click the “Decimal” radio button if it is not already selected. The “Value data” should NOT contain letters when in Decimal mode. Change the value to “1000” (now more than ever; WITHOUT quotes!)

Step 5: Scheduling Events

If you don’t want to turn your computer off often, you can use the Windows Task Scheduler. If you choose to do this, try the following:

1.) Open the run dialog and type “Taskschd.msc.”

2.) In the Actions pane to the right of the Task Scheduler window, click on “Create Basic Task…”

3.) Give your new task a name and, if you want, a description.

4.) After clicking next, select daily, click next, choose the time you want the photo refresh to be executed, then click next.

5.) In this section, select the radio “Start a program,” then click next.

6.) Now, either manually enter the location of the “Refresh Image.jar” file, or use browse to find it.

Click next, then Finish.

Step 6: Done!

That's it! You should try restarting your computer next time the photo is updated, and waiting to make sure that the desktop changes within whatever time was previously set for the slideshow interval.

I hope you liked this instructable, and I hope everything in it works. I may not be able to help with some problems related to setting this up, but if I can, I'd be glad to help. Please give me advice on this (my first) instructable. Thanks for reading through, and have a nice day!



  • Creative Misuse Contest

    Creative Misuse Contest
  • Oil Contest

    Oil Contest
  • Water Contest

    Water Contest

34 Discussions

Errr I got a lil issue : The taskmanager won't run the jar file !

Here are the settings I set up :

- Run wether user is logged or not

- Trigger : on connection to user session (on local connection to any user session) -> so it refresh everytime I log on, that's because I dont often turn my computer off. (maybe the 'log on' isn't when I log on from 'sleep' ?)

I checked the jar file path ofc

Ask for any setup you need !

Also, it doesnt work when I run the task on demand

2 replies

If you manually run the .jar file with administrator privileges, does it show up in Task Manager, and, if so, does it give an error? If the program shows up and no error boxes open, is it not changing the image in the folder it is placed, or is your OS not updating the desktop?

The task is continuously ran in the TM but the jar just doesn't open, even if the task is manually run or not. When I run the jar file in the folder location, the pics then the wallpaper are updated. I think the issue is the TM that can not run the task..

It worked out great.

How to add a proxy server?

Thank You.

It worked out great for me. The images are wonderful. Thank You

Hello, so how is it to be the autor of the 'potential' best Instructables ?

'Potential' because I have one issue : the jar file won't launch and create the img used by the bat file. Please can you help me on that ?

I also noticed that my Registry doesn't save the changes : the value '1000' is saved but not the Decimal tick, it stays on the Hexodecimal box when I close and open it again. Not sure if it has it's importance..

Thanks in advance !

9 replies

If the jar file won't create the file, it is possible that the version of Java on your computer isn't up to date, but it seems more likely that the jar file doesn't have access to change the folder. You can try right clicking and selecting "Run as Administrator" or just moving it to a different folder such as your desktop and trying it there. Do any error boxes show up when it runs?

Also, the registry won't save that setting. As long as the decimal number stays the same.

I checked the version of Java.

I don't have the option when I right click on it, but I have all the permissions as checked in the file properties. I had error boxes once when I tried to execute it, but the image spawned anyway. Now, I don't have any, and the image doesn't show up even if I move the jar file to the desktop. Strange huh ?

Thanks for answering btw !

Another possibility that
I've noticed is that the .jar file might have a network issue that doesn't
result in a visible error. A slow connection or a network-side firewall might be the
issue. Does the Command Prompt window stay open when it first runs, or does it
close quickly? Also, do you know if the error you got was in writing the image or
if it was in getting the RSS?

Ok, so it was the firewall, I allowed java.exe and it looks like it is working now.

Btw the Command prompt closed quickly and I dont remember the error, but I might be linked with the firewall issue !

In any case, that makes you the author of the best Instructables imo !

Another possibility that
I've noticed is that the .jar file might have a network issue that doesn't
result in an error. A slow connection or a network side firewall might be the
issue. Does the Command Prompt window stay open when it first runs, or does it
close quickly? Also, if you get any errors, do do they say if the error was in writing the image or
if it was in getting the RSS?

Nice tutorial,

I'm having difficulty getting the desktop background to change, i cant seem to set slideshow with only one image on windows 7.

All the other bits work, the image gets replaced with the new one just doesn't come onto desktop.

Any ideas please?

3 replies

Do you know if your slideshow changes when there are multiple images in the folder?

Hey, Yes it works when i select more than one image, i dont have the ability to select a folder like in the tutorial just individual images.

I don't have any access to a PC with Windows 7, so I can't test it, but I just updated the file to instead keep two files instead of deleting one. This should work, just select both files after running the program once.

I've been wanting this so long..... lol. Thank you so much! Made my day.... or... may I (every)day... =)